# -*- coding: utf-8 -*-

from collections import namedtuple
from enum import Enum

CONTINUATION_CODE = '88'


class RecordCode(Enum):
    file_header = '01'
    group_header = '02'
    account_identifier = '03'
    transaction_detail = '16'
    account_trailer = '49'
    continuation = '88'
    group_trailer = '98'
    file_trailer = '99'


class GroupStatus(Enum):
    update = '1'
    deletion = '2'
    correction = '3'
    test_only = '4'


class AsOfDateModifier(Enum):
    interim_previous_day = '1'
    final_previous_day = '2'
    interim_same_day = '3'
    final_same_day = '4'


class FundsType(Enum):
    unknown_availability = 'Z'
    immediate_availability = '0'
    one_day_availability = '1'
    two_day_availability = '2'
    distributed_availability_simple = 'S'
    value_dated = 'V'
    distributed_availability = 'D'


class TypeCodeTransaction(Enum):
    credit = 'credit'
    debit = 'debit'
    misc = 'misc'


class TypeCodeLevel(Enum):
    status = 'status'
    detail = 'detail'
    summary = 'summary'


TypeCode = namedtuple('TypeCode', ['code', 'transaction', 'level', 'description'])
TypeCodes = {
    '010': TypeCode('010', None, TypeCodeLevel.status, 'Opening Ledger'),
    '011': TypeCode('011', None, TypeCodeLevel.status, 'Average Opening Ledger MTD'),
    '012': TypeCode('012', None, TypeCodeLevel.status, 'Average Opening Ledger YTD'),
    '015': TypeCode('015', None, TypeCodeLevel.status, 'Closing Ledger'),
    '020': TypeCode('020', None, TypeCodeLevel.status, 'Average Closing Ledger MTD'),
    '021': TypeCode('021', None, TypeCodeLevel.status, 'Average Closing Ledger – Previous Month'),
    '022': TypeCode('022', None, TypeCodeLevel.status, 'Aggregate Balance Adjustments'),
    '024': TypeCode('024', None, TypeCodeLevel.status, 'Average Closing Ledger YTD – Previous Month'),
    '025': TypeCode('025', None, TypeCodeLevel.status, 'Average Closing Ledger YTD'),
    '030': TypeCode('030', None, TypeCodeLevel.status, 'Current Ledger'),
    '037': TypeCode('037', None, TypeCodeLevel.status, 'ACH Net Position'),
    '039': TypeCode('039', None, TypeCodeLevel.status, 'Opening Available + Total Same-Day ACH DTC Deposit'),
    '040': TypeCode('040', None, TypeCodeLevel.status, 'Opening Available'),
    '041': TypeCode('041', None, TypeCodeLevel.status, 'Average Opening Available MTD'),
    '042': TypeCode('042', None, TypeCodeLevel.status, 'Average Opening Available YTD'),
    '043': TypeCode('043', None, TypeCodeLevel.status, 'Average Available – Previous Month'),
    '044': TypeCode('044', None, TypeCodeLevel.status, 'Disbursing Opening Available Balance'),
    '045': TypeCode('045', None, TypeCodeLevel.status, 'Closing Available'),
    '050': TypeCode('050', None, TypeCodeLevel.status, 'Average Closing Available MTD'),
    '051': TypeCode('051', None, TypeCodeLevel.status, 'Average Closing Available – Last Month'),
    '054': TypeCode('054', None, TypeCodeLevel.status, 'Average Closing Available YTD – Last Month'),
    '055': TypeCode('055', None, TypeCodeLevel.status, 'Average Closing Available YTD'),
    '056': TypeCode('056', None, TypeCodeLevel.status, 'Loan Balance'),
    '057': TypeCode('057', None, TypeCodeLevel.status, 'Total Investment Position'),
    '059': TypeCode('059', None, TypeCodeLevel.status, 'Current Available (CRS Supressed)'),
    '060': TypeCode('060', None, TypeCodeLevel.status, 'Current Available'),
    '061': TypeCode('061', None, TypeCodeLevel.status, 'Average Current Available MTD'),
    '062': TypeCode('062', None, TypeCodeLevel.status, 'Average Current Available YTD'),
    '063': TypeCode('063', None, TypeCodeLevel.status, 'Total Float'),
    '065': TypeCode('065', None, TypeCodeLevel.status, 'Target Balance'),
    '066': TypeCode('066', None, TypeCodeLevel.status, 'Adjusted Balance'),
    '067': TypeCode('067', None, TypeCodeLevel.status, 'Adjusted Balance MTD'),
    '068': TypeCode('068', None, TypeCodeLevel.status, 'Adjusted Balance YTD'),
    '070': TypeCode('070', None, TypeCodeLevel.status, '0-Day Float'),
    '072': TypeCode('072', None, TypeCodeLevel.status, '1-Day Float'),
    '073': TypeCode('073', None, TypeCodeLevel.status, 'Float Adjustment'),
    '074': TypeCode('074', None, TypeCodeLevel.status, '2 or More Days Float'),
    '075': TypeCode('075', None, TypeCodeLevel.status, '3 or More Days Float'),
    '076': TypeCode('076', None, TypeCodeLevel.status, 'Adjustment to Balances'),
    '077': TypeCode('077', None, TypeCodeLevel.status, 'Average Adjustment to Balances MTD'),
    '078': TypeCode('078', None, TypeCodeLevel.status, 'Average Adjustment to Balances YTD'),
    '079': TypeCode('079', None, TypeCodeLevel.status, '4-Day Float'),
    '080': TypeCode('080', None, TypeCodeLevel.status, '5-Day Float'),
    '081': TypeCode('081', None, TypeCodeLevel.status, '6-Day Float'),
    '082': TypeCode('082', None, TypeCodeLevel.status, 'Average 1-Day Float MTD'),
    '083': TypeCode('083', None, TypeCodeLevel.status, 'Average 1-Day Float YTD'),
    '084': TypeCode('084', None, TypeCodeLevel.status, 'Average 2-Day Float MTD'),
    '085': TypeCode('085', None, TypeCodeLevel.status, 'Average 2-Day Float YTD'),
    '086': TypeCode('086', None, TypeCodeLevel.status, 'Transfer Calculation'),
    '100': TypeCode('100', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Credits'),
    '101': TypeCode('101', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Credit Amount MTD'),
    '105': TypeCode('105', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Credits Not Detailed'),
    '106': TypeCode('106', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Deposits Subject to Float'),
    '107': TypeCode('107', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Adjustment Credits YTD'),
    '108': TypeCode('108', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Credit (Any Type)'),
    '109': TypeCode('109', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Current Day Total Lockbox Deposits'),
    '110': TypeCode('110', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Lockbox Deposits'),
    '115': TypeCode('115', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Lockbox Deposit'),
    '116': TypeCode('116', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Item in Lockbox Deposit'),
    '118': TypeCode('118', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Lockbox Adjustment Credit'),
    '120': TypeCode('120', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'EDI* Transaction Credit'),
    '121': TypeCode('121', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'EDI Transaction Credit'),
    '122': TypeCode('122', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'EDIBANX Credit Received'),
    '123': TypeCode('123', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'EDIBANX Credit Return'),
    '130': TypeCode('130', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Concentration Credits'),
    '131': TypeCode('131', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total DTC Credits'),
    '135': TypeCode('135', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'DTC Concentration Credit'),
    '136': TypeCode('136', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Item in DTC Deposit'),
    '140': TypeCode('140', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total ACH Credits'),
    '142': TypeCode('142', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'ACH Credit Received'),
    '143': TypeCode('143', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Item in ACH Deposit'),
    '145': TypeCode('145', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'ACH Concentration Credit'),
    '146': TypeCode('146', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Bank Card Deposits'),
    '147': TypeCode('147', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Individual Bank Card Deposit'),
    '150': TypeCode('150', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Preauthorized Payment Credits'),
    '155': TypeCode('155', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Preauthorized Draft Credit'),
    '156': TypeCode('156', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Item in PAC Deposit'),
    '160': TypeCode('160', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total ACH Disbursing Funding Credits'),
    '162': TypeCode('162', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Corporate Trade Payment Settlement'),
    '163': TypeCode('163', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Corporate Trade Payment Credits'),
    '164': TypeCode('164', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Corporate Trade Payment Credit'),
    '165': TypeCode('165', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Preauthorized ACH Credit'),
    '166': TypeCode('166', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'ACH Settlement'),
    '167': TypeCode('167', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'ACH Settlement Credits'),
    '168': TypeCode('168', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'ACH Return Item or Adjustment Settlement'),
    '169': TypeCode('169', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Miscellaneous ACH Credit'),
    '170': TypeCode('170', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Other Check Deposits'),
    '171': TypeCode('171', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Individual Loan Deposit'),
    '172': TypeCode('172', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Deposit Correction'),
    '173': TypeCode('173', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Bank-Prepared Deposit'),
    '174': TypeCode('174', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Other Deposit'),
    '175': TypeCode('175', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Check Deposit Package'),
    '176': TypeCode('176', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Re-presented Check Deposit'),
    '178': TypeCode('178', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'List Post Credits'),
    '180': TypeCode('180', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Loan Proceeds'),
    '182': TypeCode('182', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Bank-Prepared Deposits'),
    '184': TypeCode('184', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Draft Deposit'),
    '185': TypeCode('185', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Miscellaneous Deposits'),
    '186': TypeCode('186', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Cash Letter Credits'),
    '187': TypeCode('187', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Cash Letter Credit'),
    '188': TypeCode('188', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Cash Letter Adjustments'),
    '189': TypeCode('189', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Cash Letter Adjustment'),
    '190': TypeCode('190', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Incoming Money Transfers'),
    '191': TypeCode('191', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Individual Incoming Internal Money Transfer'),
    '195': TypeCode('195', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Incoming Money Transfer'),
    '196': TypeCode('196', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Money Transfer Adjustment'),
    '198': TypeCode('198', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Compensation'),
    '200': TypeCode('200', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Automatic Transfer Credits'),
    '201': TypeCode('201', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Individual Automatic Transfer Credit'),
    '202': TypeCode('202', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Bond Operations Credit'),
    '205': TypeCode('205', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Book Transfer Credits'),
    '206': TypeCode('206', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Book Transfer Credit'),
    '207': TypeCode('207', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total International Money Transfer Credits'),
    '208': TypeCode('208', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Individual International Money Transfer Credit'),
    '210': TypeCode('210', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total International Credits'),
    '212': TypeCode('212', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Foreign Letter of Credit'),
    '213': TypeCode('213', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Letter of Credit'),
    '214': TypeCode('214', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Foreign Exchange of Credit'),
    '215': TypeCode('215', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Letters of Credit'),
    '216': TypeCode('216', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Foreign Remittance Credit'),
    '218': TypeCode('218', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Foreign Collection Credit'),
    '221': TypeCode('221', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Foreign Check Purchase'),
    '222': TypeCode('222', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Foreign Checks Deposited'),
    '224': TypeCode('224', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Commission'),
    '226': TypeCode('226', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'International Money Market Trading'),
    '227': TypeCode('227', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Standing Order'),
    '229': TypeCode('229', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Miscellaneous International Credit'),
    '230': TypeCode('230', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Security Credits'),
    '231': TypeCode('231', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Collection Credits'),
    '232': TypeCode('232', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Sale of Debt Security'),
    '233': TypeCode('233', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Securities Sold'),
    '234': TypeCode('234', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Sale of Equity Security'),
    '235': TypeCode('235', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Matured Reverse Repurchase Order'),
    '236': TypeCode('236', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Maturity of Debt Security'),
    '237': TypeCode('237', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Individual Collection Credit'),
    '238': TypeCode('238', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Collection of Dividends'),
    '239': TypeCode('239', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Bankers’ Acceptance Credits'),
    '240': TypeCode('240', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Coupon Collections – Banks'),
    '241': TypeCode('241', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Bankers’ Acceptances'),
    '242': TypeCode('242', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Collection of Interest Income'),
    '243': TypeCode('243', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Matured Fed Funds Purchased'),
    '244': TypeCode('244', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Interest/Matured Principal Payment'),
    '245': TypeCode('245', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Monthly Dividends'),
    '246': TypeCode('246', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Commercial Paper'),
    '247': TypeCode('247', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Capital Change'),
    '248': TypeCode('248', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Savings Bonds Sales Adjustment'),
    '249': TypeCode('249', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Miscellaneous Security Credit'),
    '250': TypeCode('250', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Checks Posted and Returned'),
    '251': TypeCode('251', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Debit Reversals'),
    '252': TypeCode('252', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Debit Reversal'),
    '254': TypeCode('254', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Posting Error Correction Credit'),
    '255': TypeCode('255', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Check Posted and Returned'),
    '256': TypeCode('256', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total ACH Return Items'),
    '257': TypeCode('257', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Individual ACH Return Item'),
    '258': TypeCode('258', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'ACH Reversal Credit'),
    '260': TypeCode('260', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Rejected Credits'),
    '261': TypeCode('261', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Individual Rejected Credit'),
    '263': TypeCode('263', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Overdraft'),
    '266': TypeCode('266', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Return Item'),
    '268': TypeCode('268', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Return Item Adjustment'),
    '270': TypeCode('270', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total ZBA Credits'),
    '271': TypeCode('271', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Net Zero-Balance Amount'),
    '274': TypeCode('274', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Cumulative** ZBA or Disbursement Credits'),
    '275': TypeCode('275', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'ZBA Credit'),
    '276': TypeCode('276', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'ZBA Float Adjustment'),
    '277': TypeCode('277', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'ZBA Credit Transfer'),
    '278': TypeCode('278', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'ZBA Credit Adjustment'),
    '280': TypeCode('280', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Controlled Disbursing Credits'),
    '281': TypeCode('281', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Individual Controlled Disbursing Credit'),
    '285': TypeCode('285', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total DTC Disbursing Credits'),
    '286': TypeCode('286', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Individual DTC Disbursing Credit'),
    '294': TypeCode('294', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total ATM Credits'),
    '295': TypeCode('295', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'ATM Credit'),
    '301': TypeCode('301', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Commercial Deposit'),
    '302': TypeCode('302', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Correspondent Bank Deposit'),
    '303': TypeCode('303', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Wire Transfers In – FF'),
    '304': TypeCode('304', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Wire Transfers In – CHF'),
    '305': TypeCode('305', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Fed Funds Sold'),
    '306': TypeCode('306', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Fed Funds Sold'),
    '307': TypeCode('307', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Trust Credits'),
    '308': TypeCode('308', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Trust Credit'),
    '309': TypeCode('309', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Value - Dated Funds'),
    '310': TypeCode('310', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Commercial Deposits'),
    '315': TypeCode('315', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total International Credits – FF'),
    '316': TypeCode('316', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total International Credits – CHF'),
    '318': TypeCode('318', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Foreign Check Purchased'),
    '319': TypeCode('319', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Late Deposit'),
    '320': TypeCode('320', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Securities Sold – FF'),
    '321': TypeCode('321', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Securities Sold – CHF'),
    '324': TypeCode('324', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Securities Matured – FF'),
    '325': TypeCode('325', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Securities Matured – CHF'),
    '326': TypeCode('326', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Securities Interest'),
    '327': TypeCode('327', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Securities Matured'),
    '328': TypeCode('328', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Securities Interest – FF'),
    '329': TypeCode('329', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Securities Interest – CHF'),
    '330': TypeCode('330', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Escrow Credits'),
    '331': TypeCode('331', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Individual Escrow Credit'),
    '332': TypeCode('332', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Miscellaneous Securities Credits – FF'),
    '336': TypeCode('336', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Miscellaneous Securities Credits – CHF'),
    '338': TypeCode('338', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Securities Sold'),
    '340': TypeCode('340', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Broker Deposits'),
    '341': TypeCode('341', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Broker Deposits – FF'),
    '342': TypeCode('342', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Broker Deposit'),
    '343': TypeCode('343', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Broker Deposits – CHF'),
    '344': TypeCode('344', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Individual Back Value Credit'),
    '345': TypeCode('345', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Item in Brokers Deposit'),
    '346': TypeCode('346', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Sweep Interest Income'),
    '347': TypeCode('347', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Sweep Principal Sell'),
    '348': TypeCode('348', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Futures Credit'),
    '349': TypeCode('349', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Principal Payments Credit'),
    '350': TypeCode('350', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Investment Sold'),
    '351': TypeCode('351', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Individual Investment Sold'),
    '352': TypeCode('352', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Cash Center Credits'),
    '353': TypeCode('353', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Cash Center Credit'),
    '354': TypeCode('354', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Interest Credit'),
    '355': TypeCode('355', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Investment Interest'),
    '356': TypeCode('356', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Credit Adjustment'),
    '357': TypeCode('357', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Credit Adjustment'),
    '358': TypeCode('358', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'YTD Adjustment Credit'),
    '359': TypeCode('359', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Interest Adjustment Credit'),
    '360': TypeCode('360', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Credits Less Wire Transfer and Returned Checks'),
    '361': TypeCode('361', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Grand Total Credits Less Grand Total Debits'),
    '362': TypeCode('362', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Correspondent Collection'),
    '363': TypeCode('363', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Correspondent Collection Adjustment'),
    '364': TypeCode('364', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Loan Participation'),
    '366': TypeCode('366', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Currency and Coin Deposited'),
    '367': TypeCode('367', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Food Stamp Letter'),
    '368': TypeCode('368', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Food Stamp Adjustment'),
    '369': TypeCode('369', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Clearing Settlement Credit'),
    '370': TypeCode('370', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Back Value Credits'),
    '372': TypeCode('372', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Back Value Adjustment'),
    '373': TypeCode('373', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Customer Payroll'),
    '374': TypeCode('374', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'FRB Statement Recap'),
    '376': TypeCode('376', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Savings Bond Letter or Adjustment'),
    '377': TypeCode('377', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Treasury Tax and Loan Credit'),
    '378': TypeCode('378', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Transfer of Treasury Credit'),
    '379': TypeCode('379', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'FRB Government Checks Cash Letter Credit'),
    '381': TypeCode('381', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'FRB Government Check Adjustment'),
    '382': TypeCode('382', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'FRB Postal Money Order Credit'),
    '383': TypeCode('383', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'FRB Postal Money Order Adjustment'),
    '384': TypeCode('384', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'FRB Cash Letter Auto Charge Credit'),
    '385': TypeCode('385', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Universal Credits'),
    '386': TypeCode('386', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'FRB Cash Letter Auto Charge Adjustment'),
    '387': TypeCode('387', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'FRB Fine-Sort Cash Letter Credit'),
    '388': TypeCode('388', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'FRB Fine-Sort Adjustment'),
    '389': TypeCode('389', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Freight Payment Credits'),
    '390': TypeCode('390', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Miscellaneous Credits'),
    '391': TypeCode('391', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Universal Credit'),
    '392': TypeCode('392', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Freight Payment Credit'),
    '393': TypeCode('393', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Itemized Credit Over $10,000'),
    '394': TypeCode('394', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Cumulative** Credits'),
    '395': TypeCode('395', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Check Reversal'),
    '397': TypeCode('397', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Float Adjustment'),
    '398': TypeCode('398', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Miscellaneous Fee Refund'),
    '399': TypeCode('399', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Miscellaneous Credit'),
    '400': TypeCode('400', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Debits'),
    '401': TypeCode('401', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Debit Amount MTD'),
    '403': TypeCode('403', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Today’s Total Debits'),
    '405': TypeCode('405', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Debit Less Wire Transfers and ChargeBacks'),
    '406': TypeCode('406', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Debits not Detailed'),
    '408': TypeCode('408', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Float Adjustment'),
    '409': TypeCode('409', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Debit (Any Type)'),
    '410': TypeCode('410', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total YTD Adjustment'),
    '412': TypeCode('412', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Debits (Excluding Returned Items)'),
    '415': TypeCode('415', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Lockbox Debit'),
    '416': TypeCode('416', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Lockbox Debits'),
    '420': TypeCode('420', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'EDI Transaction Debits'),
    '421': TypeCode('421', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'EDI Transaction Debit'),
    '422': TypeCode('422', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'EDIBANX Settlement Debit'),
    '423': TypeCode('423', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'EDIBANX Return Item Debit'),
    '430': TypeCode('430', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Payable–Through Drafts'),
    '435': TypeCode('435', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Payable–Through Draft'),
    '445': TypeCode('445', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'ACH Concentration Debit'),
    '446': TypeCode('446', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total ACH Disbursement Funding Debits'),
    '447': TypeCode('447', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'ACH Disbursement Funding Debit'),
    '450': TypeCode('450', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total ACH Debits'),
    '451': TypeCode('451', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'ACH Debit Received'),
    '452': TypeCode('452', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Item in ACH Disbursement or Debit'),
    '455': TypeCode('455', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Preauthorized ACH Debit'),
    '462': TypeCode('462', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Account Holder Initiated ACH Debit'),
    '463': TypeCode('463', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Corporate Trade Payment Debits'),
    '464': TypeCode('464', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Corporate Trade Payment Debit'),
    '465': TypeCode('465', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Corporate Trade Payment Settlement'),
    '466': TypeCode('466', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'ACH Settlement'),
    '467': TypeCode('467', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'ACH Settlement Debits'),
    '468': TypeCode('468', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'ACH Return Item or Adjustment Settlement'),
    '469': TypeCode('469', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Miscellaneous ACH Debit'),
    '470': TypeCode('470', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Check Paid'),
    '471': TypeCode('471', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Check Paid – Cumulative MTD'),
    '472': TypeCode('472', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Cumulative** Checks Paid'),
    '474': TypeCode('474', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Certified Check Debit'),
    '475': TypeCode('475', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Check Paid'),
    '476': TypeCode('476', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Federal Reserve Bank Letter Debit'),
    '477': TypeCode('477', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Bank Originated Debit'),
    '478': TypeCode('478', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'List Post Debits'),
    '479': TypeCode('479', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'List Post Debit'),
    '480': TypeCode('480', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Loan Payments'),
    '481': TypeCode('481', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Individual Loan Payment'),
    '482': TypeCode('482', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Bank-Originated Debits'),
    '484': TypeCode('484', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Draft'),
    '485': TypeCode('485', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'DTC Debit'),
    '486': TypeCode('486', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Cash Letter Debits'),
    '487': TypeCode('487', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Cash Letter Debit'),
    '489': TypeCode('489', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Cash Letter Adjustment'),
    '490': TypeCode('490', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Outgoing Money Transfers'),
    '491': TypeCode('491', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Individual Outgoing Internal Money Transfer'),
    '493': TypeCode('493', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Customer Terminal Initiated Money Transfer'),
    '495': TypeCode('495', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Outgoing Money Transfer'),
    '496': TypeCode('496', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Money Transfer Adjustment'),
    '498': TypeCode('498', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Compensation'),
    '500': TypeCode('500', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Automatic Transfer Debits'),
    '501': TypeCode('501', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Individual Automatic Transfer Debit'),
    '502': TypeCode('502', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Bond Operations Debit'),
    '505': TypeCode('505', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Book Transfer Debits'),
    '506': TypeCode('506', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Book Transfer Debit'),
    '507': TypeCode('507', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total International Money Transfer Debits'),
    '508': TypeCode('508', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Individual International Money Transfer Debits'),
    '510': TypeCode('510', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total International Debits'),
    '512': TypeCode('512', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Letter of Credit Debit'),
    '513': TypeCode('513', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Letter of Credit'),
    '514': TypeCode('514', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Foreign Exchange Debit'),
    '515': TypeCode('515', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Letters of Credit'),
    '516': TypeCode('516', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Foreign Remittance Debit'),
    '518': TypeCode('518', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Foreign Collection Debit'),
    '522': TypeCode('522', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Foreign Checks Paid'),
    '524': TypeCode('524', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Commission'),
    '526': TypeCode('526', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'International Money Market Trading'),
    '527': TypeCode('527', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Standing Order'),
    '529': TypeCode('529', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Miscellaneous International Debit'),
    '530': TypeCode('530', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Security Debits'),
    '531': TypeCode('531', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Securities Purchased'),
    '532': TypeCode('532', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Amount of Securities Purchased'),
    '533': TypeCode('533', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Security Collection Debit'),
    '534': TypeCode('534', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Miscellaneous Securities DB – FF'),
    '535': TypeCode('535', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Purchase of Equity Securities'),
    '536': TypeCode('536', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Miscellaneous Securities Debit – CHF'),
    '537': TypeCode('537', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Collection Debit'),
    '538': TypeCode('538', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Matured Repurchase Order'),
    '539': TypeCode('539', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Bankers’ Acceptances Debit'),
    '540': TypeCode('540', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Coupon Collection Debit'),
    '541': TypeCode('541', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Bankers’ Acceptances'),
    '542': TypeCode('542', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Purchase of Debt Securities'),
    '543': TypeCode('543', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Domestic Collection'),
    '544': TypeCode('544', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Interest/Matured Principal Payment'),
    '546': TypeCode('546', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Commercial paper'),
    '547': TypeCode('547', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Capital Change'),
    '548': TypeCode('548', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Savings Bonds Sales Adjustment'),
    '549': TypeCode('549', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Miscellaneous Security Debit'),
    '550': TypeCode('550', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Deposited Items Returned'),
    '551': TypeCode('551', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Credit Reversals'),
    '552': TypeCode('552', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Credit Reversal'),
    '554': TypeCode('554', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Posting Error Correction Debit'),
    '555': TypeCode('555', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Deposited Item Returned'),
    '556': TypeCode('556', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total ACH Return Items'),
    '557': TypeCode('557', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Individual ACH Return Item'),
    '558': TypeCode('558', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'ACH Reversal Debit'),
    '560': TypeCode('560', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Rejected Debits'),
    '561': TypeCode('561', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Individual Rejected Debit'),
    '563': TypeCode('563', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Overdraft'),
    '564': TypeCode('564', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Overdraft Fee'),
    '566': TypeCode('566', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Return Item'),
    '567': TypeCode('567', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Return Item Fee'),
    '568': TypeCode('568', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Return Item Adjustment'),
    '570': TypeCode('570', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total ZBA Debits'),
    '574': TypeCode('574', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Cumulative ZBA Debits'),
    '575': TypeCode('575', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'ZBA Debit'),
    '577': TypeCode('577', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'ZBA Debit Transfer'),
    '578': TypeCode('578', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'ZBA Debit Adjustment'),
    '580': TypeCode('580', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Controlled Disbursing Debits'),
    '581': TypeCode('581', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Individual Controlled Disbursing Debit'),
    '583': TypeCode('583', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Disbursing Checks Paid – Early Amount'),
    '584': TypeCode('584', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Disbursing Checks Paid – Later Amount'),
    '585': TypeCode('585', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Disbursing Funding Requirement'),
    '586': TypeCode('586', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'FRB Presentment Estimate (Fed Estimate)'),
    '587': TypeCode('587', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Late Debits (After Notification)'),
    '588': TypeCode('588', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Disbursing Checks Paid-Last Amount'),
    '590': TypeCode('590', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total DTC Debits'),
    '594': TypeCode('594', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total ATM Debits'),
    '595': TypeCode('595', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'ATM Debit'),
    '596': TypeCode('596', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total APR Debits'),
    '597': TypeCode('597', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'ARP Debit'),
    '601': TypeCode('601', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Estimated Total Disbursement'),
    '602': TypeCode('602', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Adjusted Total Disbursement'),
    '610': TypeCode('610', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Funds Required'),
    '611': TypeCode('611', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Wire Transfers Out- CHF'),
    '612': TypeCode('612', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Wire Transfers Out – FF'),
    '613': TypeCode('613', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total International Debit – CHF'),
    '614': TypeCode('614', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total International Debit – FF'),
    '615': TypeCode('615', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Federal Reserve Bank – Commercial Bank Debit'),
    '616': TypeCode('616', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Federal Reserve Bank – Commercial Bank Debit'),
    '617': TypeCode('617', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Securities Purchased – CHF'),
    '618': TypeCode('618', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Securities Purchased – FF'),
    '621': TypeCode('621', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Broker Debits – CHF'),
    '622': TypeCode('622', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Broker Debit'),
    '623': TypeCode('623', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Broker Debits – FF'),
    '625': TypeCode('625', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Broker Debits'),
    '626': TypeCode('626', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Fed Funds Purchased'),
    '627': TypeCode('627', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Fed Funds Purchased'),
    '628': TypeCode('628', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Cash Center Debits'),
    '629': TypeCode('629', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Cash Center Debit'),
    '630': TypeCode('630', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Debit Adjustments'),
    '631': TypeCode('631', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Debit Adjustment'),
    '632': TypeCode('632', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Trust Debits'),
    '633': TypeCode('633', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Trust Debit'),
    '634': TypeCode('634', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'YTD Adjustment Debit'),
    '640': TypeCode('640', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Escrow Debits'),
    '641': TypeCode('641', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Individual Escrow Debit'),
    '644': TypeCode('644', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Individual Back Value Debit'),
    '646': TypeCode('646', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Transfer Calculation Debit'),
    '650': TypeCode('650', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Investments Purchased'),
    '651': TypeCode('651', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Individual Investment purchased'),
    '654': TypeCode('654', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Interest Debit'),
    '655': TypeCode('655', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Investment Interest Debits'),
    '656': TypeCode('656', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Sweep Principal Buy'),
    '657': TypeCode('657', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Futures Debit'),
    '658': TypeCode('658', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Principal Payments Debit'),
    '659': TypeCode('659', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Interest Adjustment Debit'),
    '661': TypeCode('661', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Account Analysis Fee'),
    '662': TypeCode('662', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Correspondent Collection Debit'),
    '663': TypeCode('663', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Correspondent Collection Adjustment'),
    '664': TypeCode('664', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Loan Participation'),
    '665': TypeCode('665', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Intercept Debits'),
    '666': TypeCode('666', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Currency and Coin Shipped'),
    '667': TypeCode('667', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Food Stamp Letter'),
    '668': TypeCode('668', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Food Stamp Adjustment'),
    '669': TypeCode('669', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Clearing Settlement Debit'),
    '670': TypeCode('670', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Back Value Debits'),
    '672': TypeCode('672', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Back Value Adjustment'),
    '673': TypeCode('673', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Customer Payroll'),
    '674': TypeCode('674', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'FRB Statement Recap'),
    '676': TypeCode('676', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Savings Bond Letter or Adjustment'),
    '677': TypeCode('677', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Treasury Tax and Loan Debit'),
    '678': TypeCode('678', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Transfer of Treasury Debit'),
    '679': TypeCode('679', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'FRB Government Checks Cash Letter Debit'),
    '681': TypeCode('681', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'FRB Government Check Adjustment'),
    '682': TypeCode('682', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'FRB Postal Money Order Debit'),
    '683': TypeCode('683', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'FRB Postal Money Order Adjustment'),
    '684': TypeCode('684', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'FRB Cash Letter Auto Charge Debit'),
    '685': TypeCode('685', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Universal Debits'),
    '686': TypeCode('686', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'FRB Cash Letter Auto Charge Adjustment'),
    '687': TypeCode('687', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'FRB Fine-Sort Cash Letter Debit'),
    '688': TypeCode('688', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'FRB Fine-Sort Adjustment'),
    '689': TypeCode('689', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'FRB Freight Payment Debits'),
    '690': TypeCode('690', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Miscellaneous Debits'),
    '691': TypeCode('691', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Universal Debit'),
    '692': TypeCode('692', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Freight Payment Debit'),
    '693': TypeCode('693', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Itemized Debit Over $10,000'),
    '694': TypeCode('694', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Deposit Reversal'),
    '695': TypeCode('695', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Deposit Correction Debit'),
    '696': TypeCode('696', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Regular Collection Debit'),
    '697': TypeCode('697', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Cumulative** Debits'),
    '698': TypeCode('698', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Miscellaneous Fees'),
    '699': TypeCode('699', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Miscellaneous Debit'),
    '701': TypeCode('701', None, TypeCodeLevel.status, 'Principal Loan Balance'),
    '703': TypeCode('703', None, TypeCodeLevel.status, 'Available Commitment Amount'),
    '705': TypeCode('705', None, TypeCodeLevel.status, 'Payment Amount Due'),
    '707': TypeCode('707', None, TypeCodeLevel.status, 'Principal Amount Past Due'),
    '709': TypeCode('709', None, TypeCodeLevel.status, 'Interest Amount Past Due'),
    '720': TypeCode('720', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Loan Payment'),
    '721': TypeCode('721', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Amount Applied to Interest'),
    '722': TypeCode('722', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Amount Applied to Principal'),
    '723': TypeCode('723', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Amount Applied to Escrow'),
    '724': TypeCode('724', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Amount Applied to Late Charges'),
    '725': TypeCode('725', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Amount Applied to Buydown'),
    '726': TypeCode('726', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Amount Applied to Misc. Fees'),
    '727': TypeCode('727', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Amount Applied to Deferred Interest Detail'),
    '728': TypeCode('728', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Amount Applied to Service Charge'),
    '760': TypeCode('760', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Loan Disbursement'),
    '890': TypeCode('890', TypeCodeTransaction.misc, TypeCodeLevel.detail, 'Contains Non-monetary Information'),
}

# -*- coding: utf-8 -*-

from collections import namedtuple
from enum import Enum

CONTINUATION_CODE = '88'


class RecordCode(Enum):
    file_header = '01'
    group_header = '02'
    account_identifier = '03'
    transaction_detail = '16'
    account_trailer = '49'
    continuation = '88'
    group_trailer = '98'
    file_trailer = '99'


class GroupStatus(Enum):
    update = '1'
    deletion = '2'
    correction = '3'
    test_only = '4'


class AsOfDateModifier(Enum):
    interim_previous_day = '1'
    final_previous_day = '2'
    interim_same_day = '3'
    final_same_day = '4'


class FundsType(Enum):
    unknown_availability = 'Z'
    immediate_availability = '0'
    one_day_availability = '1'
    two_day_availability = '2'
    distributed_availability_simple = 'S'
    value_dated = 'V'
    distributed_availability = 'D'


class TypeCodeTransaction(Enum):
    credit = 'credit'
    debit = 'debit'
    misc = 'misc'


class TypeCodeLevel(Enum):
    status = 'status'
    detail = 'detail'
    summary = 'summary'


TypeCode = namedtuple('TypeCode', ['code', 'transaction', 'level', 'description'])
TypeCodes = {
    '010': TypeCode('010', None, TypeCodeLevel.status, 'Opening Ledger'),
    '011': TypeCode('011', None, TypeCodeLevel.status, 'Average Opening Ledger MTD'),
    '012': TypeCode('012', None, TypeCodeLevel.status, 'Average Opening Ledger YTD'),
    '015': TypeCode('015', None, TypeCodeLevel.status, 'Closing Ledger'),
    '020': TypeCode('020', None, TypeCodeLevel.status, 'Average Closing Ledger MTD'),
    '021': TypeCode('021', None, TypeCodeLevel.status, 'Average Closing Ledger – Previous Month'),
    '022': TypeCode('022', None, TypeCodeLevel.status, 'Aggregate Balance Adjustments'),
    '024': TypeCode('024', None, TypeCodeLevel.status, 'Average Closing Ledger YTD – Previous Month'),
    '025': TypeCode('025', None, TypeCodeLevel.status, 'Average Closing Ledger YTD'),
    '030': TypeCode('030', None, TypeCodeLevel.status, 'Current Ledger'),
    '037': TypeCode('037', None, TypeCodeLevel.status, 'ACH Net Position'),
    '039': TypeCode('039', None, TypeCodeLevel.status, 'Opening Available + Total Same-Day ACH DTC Deposit'),
    '040': TypeCode('040', None, TypeCodeLevel.status, 'Opening Available'),
    '041': TypeCode('041', None, TypeCodeLevel.status, 'Average Opening Available MTD'),
    '042': TypeCode('042', None, TypeCodeLevel.status, 'Average Opening Available YTD'),
    '043': TypeCode('043', None, TypeCodeLevel.status, 'Average Available – Previous Month'),
    '044': TypeCode('044', None, TypeCodeLevel.status, 'Disbursing Opening Available Balance'),
    '045': TypeCode('045', None, TypeCodeLevel.status, 'Closing Available'),
    '050': TypeCode('050', None, TypeCodeLevel.status, 'Average Closing Available MTD'),
    '051': TypeCode('051', None, TypeCodeLevel.status, 'Average Closing Available – Last Month'),
    '054': TypeCode('054', None, TypeCodeLevel.status, 'Average Closing Available YTD – Last Month'),
    '055': TypeCode('055', None, TypeCodeLevel.status, 'Average Closing Available YTD'),
    '056': TypeCode('056', None, TypeCodeLevel.status, 'Loan Balance'),
    '057': TypeCode('057', None, TypeCodeLevel.status, 'Total Investment Position'),
    '059': TypeCode('059', None, TypeCodeLevel.status, 'Current Available (CRS Supressed)'),
    '060': TypeCode('060', None, TypeCodeLevel.status, 'Current Available'),
    '061': TypeCode('061', None, TypeCodeLevel.status, 'Average Current Available MTD'),
    '062': TypeCode('062', None, TypeCodeLevel.status, 'Average Current Available YTD'),
    '063': TypeCode('063', None, TypeCodeLevel.status, 'Total Float'),
    '065': TypeCode('065', None, TypeCodeLevel.status, 'Target Balance'),
    '066': TypeCode('066', None, TypeCodeLevel.status, 'Adjusted Balance'),
    '067': TypeCode('067', None, TypeCodeLevel.status, 'Adjusted Balance MTD'),
    '068': TypeCode('068', None, TypeCodeLevel.status, 'Adjusted Balance YTD'),
    '070': TypeCode('070', None, TypeCodeLevel.status, '0-Day Float'),
    '072': TypeCode('072', None, TypeCodeLevel.status, '1-Day Float'),
    '073': TypeCode('073', None, TypeCodeLevel.status, 'Float Adjustment'),
    '074': TypeCode('074', None, TypeCodeLevel.status, '2 or More Days Float'),
    '075': TypeCode('075', None, TypeCodeLevel.status, '3 or More Days Float'),
    '076': TypeCode('076', None, TypeCodeLevel.status, 'Adjustment to Balances'),
    '077': TypeCode('077', None, TypeCodeLevel.status, 'Average Adjustment to Balances MTD'),
    '078': TypeCode('078', None, TypeCodeLevel.status, 'Average Adjustment to Balances YTD'),
    '079': TypeCode('079', None, TypeCodeLevel.status, '4-Day Float'),
    '080': TypeCode('080', None, TypeCodeLevel.status, '5-Day Float'),
    '081': TypeCode('081', None, TypeCodeLevel.status, '6-Day Float'),
    '082': TypeCode('082', None, TypeCodeLevel.status, 'Average 1-Day Float MTD'),
    '083': TypeCode('083', None, TypeCodeLevel.status, 'Average 1-Day Float YTD'),
    '084': TypeCode('084', None, TypeCodeLevel.status, 'Average 2-Day Float MTD'),
    '085': TypeCode('085', None, TypeCodeLevel.status, 'Average 2-Day Float YTD'),
    '086': TypeCode('086', None, TypeCodeLevel.status, 'Transfer Calculation'),
    '100': TypeCode('100', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Credits'),
    '101': TypeCode('101', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Credit Amount MTD'),
    '105': TypeCode('105', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Credits Not Detailed'),
    '106': TypeCode('106', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Deposits Subject to Float'),
    '107': TypeCode('107', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Adjustment Credits YTD'),
    '108': TypeCode('108', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Credit (Any Type)'),
    '109': TypeCode('109', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Current Day Total Lockbox Deposits'),
    '110': TypeCode('110', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Lockbox Deposits'),
    '115': TypeCode('115', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Lockbox Deposit'),
    '116': TypeCode('116', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Item in Lockbox Deposit'),
    '118': TypeCode('118', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Lockbox Adjustment Credit'),
    '120': TypeCode('120', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'EDI* Transaction Credit'),
    '121': TypeCode('121', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'EDI Transaction Credit'),
    '122': TypeCode('122', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'EDIBANX Credit Received'),
    '123': TypeCode('123', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'EDIBANX Credit Return'),
    '130': TypeCode('130', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Concentration Credits'),
    '131': TypeCode('131', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total DTC Credits'),
    '135': TypeCode('135', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'DTC Concentration Credit'),
    '136': TypeCode('136', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Item in DTC Deposit'),
    '140': TypeCode('140', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total ACH Credits'),
    '142': TypeCode('142', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'ACH Credit Received'),
    '143': TypeCode('143', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Item in ACH Deposit'),
    '145': TypeCode('145', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'ACH Concentration Credit'),
    '146': TypeCode('146', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Bank Card Deposits'),
    '147': TypeCode('147', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Individual Bank Card Deposit'),
    '150': TypeCode('150', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Preauthorized Payment Credits'),
    '155': TypeCode('155', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Preauthorized Draft Credit'),
    '156': TypeCode('156', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Item in PAC Deposit'),
    '160': TypeCode('160', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total ACH Disbursing Funding Credits'),
    '162': TypeCode('162', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Corporate Trade Payment Settlement'),
    '163': TypeCode('163', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Corporate Trade Payment Credits'),
    '164': TypeCode('164', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Corporate Trade Payment Credit'),
    '165': TypeCode('165', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Preauthorized ACH Credit'),
    '166': TypeCode('166', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'ACH Settlement'),
    '167': TypeCode('167', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'ACH Settlement Credits'),
    '168': TypeCode('168', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'ACH Return Item or Adjustment Settlement'),
    '169': TypeCode('169', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Miscellaneous ACH Credit'),
    '170': TypeCode('170', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Other Check Deposits'),
    '171': TypeCode('171', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Individual Loan Deposit'),
    '172': TypeCode('172', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Deposit Correction'),
    '173': TypeCode('173', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Bank-Prepared Deposit'),
    '174': TypeCode('174', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Other Deposit'),
    '175': TypeCode('175', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Check Deposit Package'),
    '176': TypeCode('176', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Re-presented Check Deposit'),
    '178': TypeCode('178', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'List Post Credits'),
    '180': TypeCode('180', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Loan Proceeds'),
    '182': TypeCode('182', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Bank-Prepared Deposits'),
    '184': TypeCode('184', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Draft Deposit'),
    '185': TypeCode('185', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Miscellaneous Deposits'),
    '186': TypeCode('186', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Cash Letter Credits'),
    '187': TypeCode('187', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Cash Letter Credit'),
    '188': TypeCode('188', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Cash Letter Adjustments'),
    '189': TypeCode('189', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Cash Letter Adjustment'),
    '190': TypeCode('190', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Incoming Money Transfers'),
    '191': TypeCode('191', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Individual Incoming Internal Money Transfer'),
    '195': TypeCode('195', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Incoming Money Transfer'),
    '196': TypeCode('196', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Money Transfer Adjustment'),
    '198': TypeCode('198', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Compensation'),
    '200': TypeCode('200', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Automatic Transfer Credits'),
    '201': TypeCode('201', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Individual Automatic Transfer Credit'),
    '202': TypeCode('202', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Bond Operations Credit'),
    '205': TypeCode('205', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Book Transfer Credits'),
    '206': TypeCode('206', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Book Transfer Credit'),
    '207': TypeCode('207', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total International Money Transfer Credits'),
    '208': TypeCode('208', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Individual International Money Transfer Credit'),
    '210': TypeCode('210', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total International Credits'),
    '212': TypeCode('212', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Foreign Letter of Credit'),
    '213': TypeCode('213', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Letter of Credit'),
    '214': TypeCode('214', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Foreign Exchange of Credit'),
    '215': TypeCode('215', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Letters of Credit'),
    '216': TypeCode('216', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Foreign Remittance Credit'),
    '218': TypeCode('218', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Foreign Collection Credit'),
    '221': TypeCode('221', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Foreign Check Purchase'),
    '222': TypeCode('222', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Foreign Checks Deposited'),
    '224': TypeCode('224', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Commission'),
    '226': TypeCode('226', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'International Money Market Trading'),
    '227': TypeCode('227', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Standing Order'),
    '229': TypeCode('229', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Miscellaneous International Credit'),
    '230': TypeCode('230', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Security Credits'),
    '231': TypeCode('231', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Collection Credits'),
    '232': TypeCode('232', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Sale of Debt Security'),
    '233': TypeCode('233', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Securities Sold'),
    '234': TypeCode('234', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Sale of Equity Security'),
    '235': TypeCode('235', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Matured Reverse Repurchase Order'),
    '236': TypeCode('236', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Maturity of Debt Security'),
    '237': TypeCode('237', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Individual Collection Credit'),
    '238': TypeCode('238', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Collection of Dividends'),
    '239': TypeCode('239', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Bankers’ Acceptance Credits'),
    '240': TypeCode('240', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Coupon Collections – Banks'),
    '241': TypeCode('241', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Bankers’ Acceptances'),
    '242': TypeCode('242', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Collection of Interest Income'),
    '243': TypeCode('243', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Matured Fed Funds Purchased'),
    '244': TypeCode('244', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Interest/Matured Principal Payment'),
    '245': TypeCode('245', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Monthly Dividends'),
    '246': TypeCode('246', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Commercial Paper'),
    '247': TypeCode('247', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Capital Change'),
    '248': TypeCode('248', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Savings Bonds Sales Adjustment'),
    '249': TypeCode('249', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Miscellaneous Security Credit'),
    '250': TypeCode('250', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Checks Posted and Returned'),
    '251': TypeCode('251', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Debit Reversals'),
    '252': TypeCode('252', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Debit Reversal'),
    '254': TypeCode('254', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Posting Error Correction Credit'),
    '255': TypeCode('255', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Check Posted and Returned'),
    '256': TypeCode('256', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total ACH Return Items'),
    '257': TypeCode('257', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Individual ACH Return Item'),
    '258': TypeCode('258', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'ACH Reversal Credit'),
    '260': TypeCode('260', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Rejected Credits'),
    '261': TypeCode('261', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Individual Rejected Credit'),
    '263': TypeCode('263', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Overdraft'),
    '266': TypeCode('266', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Return Item'),
    '268': TypeCode('268', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Return Item Adjustment'),
    '270': TypeCode('270', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total ZBA Credits'),
    '271': TypeCode('271', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Net Zero-Balance Amount'),
    '274': TypeCode('274', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Cumulative** ZBA or Disbursement Credits'),
    '275': TypeCode('275', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'ZBA Credit'),
    '276': TypeCode('276', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'ZBA Float Adjustment'),
    '277': TypeCode('277', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'ZBA Credit Transfer'),
    '278': TypeCode('278', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'ZBA Credit Adjustment'),
    '280': TypeCode('280', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Controlled Disbursing Credits'),
    '281': TypeCode('281', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Individual Controlled Disbursing Credit'),
    '285': TypeCode('285', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total DTC Disbursing Credits'),
    '286': TypeCode('286', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Individual DTC Disbursing Credit'),
    '294': TypeCode('294', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total ATM Credits'),
    '295': TypeCode('295', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'ATM Credit'),
    '301': TypeCode('301', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Commercial Deposit'),
    '302': TypeCode('302', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Correspondent Bank Deposit'),
    '303': TypeCode('303', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Wire Transfers In – FF'),
    '304': TypeCode('304', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Wire Transfers In – CHF'),
    '305': TypeCode('305', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Fed Funds Sold'),
    '306': TypeCode('306', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Fed Funds Sold'),
    '307': TypeCode('307', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Trust Credits'),
    '308': TypeCode('308', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Trust Credit'),
    '309': TypeCode('309', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Value - Dated Funds'),
    '310': TypeCode('310', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Commercial Deposits'),
    '315': TypeCode('315', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total International Credits – FF'),
    '316': TypeCode('316', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total International Credits – CHF'),
    '318': TypeCode('318', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Foreign Check Purchased'),
    '319': TypeCode('319', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Late Deposit'),
    '320': TypeCode('320', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Securities Sold – FF'),
    '321': TypeCode('321', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Securities Sold – CHF'),
    '324': TypeCode('324', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Securities Matured – FF'),
    '325': TypeCode('325', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Securities Matured – CHF'),
    '326': TypeCode('326', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Securities Interest'),
    '327': TypeCode('327', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Securities Matured'),
    '328': TypeCode('328', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Securities Interest – FF'),
    '329': TypeCode('329', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Securities Interest – CHF'),
    '330': TypeCode('330', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Escrow Credits'),
    '331': TypeCode('331', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Individual Escrow Credit'),
    '332': TypeCode('332', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Miscellaneous Securities Credits – FF'),
    '336': TypeCode('336', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Miscellaneous Securities Credits – CHF'),
    '338': TypeCode('338', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Securities Sold'),
    '340': TypeCode('340', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Broker Deposits'),
    '341': TypeCode('341', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Broker Deposits – FF'),
    '342': TypeCode('342', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Broker Deposit'),
    '343': TypeCode('343', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Broker Deposits – CHF'),
    '344': TypeCode('344', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Individual Back Value Credit'),
    '345': TypeCode('345', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Item in Brokers Deposit'),
    '346': TypeCode('346', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Sweep Interest Income'),
    '347': TypeCode('347', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Sweep Principal Sell'),
    '348': TypeCode('348', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Futures Credit'),
    '349': TypeCode('349', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Principal Payments Credit'),
    '350': TypeCode('350', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Investment Sold'),
    '351': TypeCode('351', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Individual Investment Sold'),
    '352': TypeCode('352', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Cash Center Credits'),
    '353': TypeCode('353', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Cash Center Credit'),
    '354': TypeCode('354', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Interest Credit'),
    '355': TypeCode('355', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Investment Interest'),
    '356': TypeCode('356', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Credit Adjustment'),
    '357': TypeCode('357', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Credit Adjustment'),
    '358': TypeCode('358', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'YTD Adjustment Credit'),
    '359': TypeCode('359', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Interest Adjustment Credit'),
    '360': TypeCode('360', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Credits Less Wire Transfer and Returned Checks'),
    '361': TypeCode('361', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Grand Total Credits Less Grand Total Debits'),
    '362': TypeCode('362', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Correspondent Collection'),
    '363': TypeCode('363', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Correspondent Collection Adjustment'),
    '364': TypeCode('364', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Loan Participation'),
    '366': TypeCode('366', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Currency and Coin Deposited'),
    '367': TypeCode('367', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Food Stamp Letter'),
    '368': TypeCode('368', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Food Stamp Adjustment'),
    '369': TypeCode('369', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Clearing Settlement Credit'),
    '370': TypeCode('370', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Back Value Credits'),
    '372': TypeCode('372', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Back Value Adjustment'),
    '373': TypeCode('373', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Customer Payroll'),
    '374': TypeCode('374', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'FRB Statement Recap'),
    '376': TypeCode('376', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Savings Bond Letter or Adjustment'),
    '377': TypeCode('377', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Treasury Tax and Loan Credit'),
    '378': TypeCode('378', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Transfer of Treasury Credit'),
    '379': TypeCode('379', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'FRB Government Checks Cash Letter Credit'),
    '381': TypeCode('381', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'FRB Government Check Adjustment'),
    '382': TypeCode('382', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'FRB Postal Money Order Credit'),
    '383': TypeCode('383', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'FRB Postal Money Order Adjustment'),
    '384': TypeCode('384', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'FRB Cash Letter Auto Charge Credit'),
    '385': TypeCode('385', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Universal Credits'),
    '386': TypeCode('386', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'FRB Cash Letter Auto Charge Adjustment'),
    '387': TypeCode('387', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'FRB Fine-Sort Cash Letter Credit'),
    '388': TypeCode('388', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'FRB Fine-Sort Adjustment'),
    '389': TypeCode('389', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Freight Payment Credits'),
    '390': TypeCode('390', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Miscellaneous Credits'),
    '391': TypeCode('391', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Universal Credit'),
    '392': TypeCode('392', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Freight Payment Credit'),
    '393': TypeCode('393', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Itemized Credit Over $10,000'),
    '394': TypeCode('394', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Cumulative** Credits'),
    '395': TypeCode('395', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Check Reversal'),
    '397': TypeCode('397', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Float Adjustment'),
    '398': TypeCode('398', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Miscellaneous Fee Refund'),
    '399': TypeCode('399', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Miscellaneous Credit'),
    '400': TypeCode('400', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Debits'),
    '401': TypeCode('401', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Debit Amount MTD'),
    '403': TypeCode('403', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Today’s Total Debits'),
    '405': TypeCode('405', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Debit Less Wire Transfers and ChargeBacks'),
    '406': TypeCode('406', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Debits not Detailed'),
    '408': TypeCode('408', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Float Adjustment'),
    '409': TypeCode('409', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Debit (Any Type)'),
    '410': TypeCode('410', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total YTD Adjustment'),
    '412': TypeCode('412', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Debits (Excluding Returned Items)'),
    '415': TypeCode('415', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Lockbox Debit'),
    '416': TypeCode('416', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Lockbox Debits'),
    '420': TypeCode('420', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'EDI Transaction Debits'),
    '421': TypeCode('421', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'EDI Transaction Debit'),
    '422': TypeCode('422', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'EDIBANX Settlement Debit'),
    '423': TypeCode('423', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'EDIBANX Return Item Debit'),
    '430': TypeCode('430', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Payable–Through Drafts'),
    '435': TypeCode('435', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Payable–Through Draft'),
    '445': TypeCode('445', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'ACH Concentration Debit'),
    '446': TypeCode('446', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total ACH Disbursement Funding Debits'),
    '447': TypeCode('447', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'ACH Disbursement Funding Debit'),
    '450': TypeCode('450', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total ACH Debits'),
    '451': TypeCode('451', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'ACH Debit Received'),
    '452': TypeCode('452', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Item in ACH Disbursement or Debit'),
    '455': TypeCode('455', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Preauthorized ACH Debit'),
    '462': TypeCode('462', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Account Holder Initiated ACH Debit'),
    '463': TypeCode('463', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Corporate Trade Payment Debits'),
    '464': TypeCode('464', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Corporate Trade Payment Debit'),
    '465': TypeCode('465', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Corporate Trade Payment Settlement'),
    '466': TypeCode('466', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'ACH Settlement'),
    '467': TypeCode('467', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'ACH Settlement Debits'),
    '468': TypeCode('468', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'ACH Return Item or Adjustment Settlement'),
    '469': TypeCode('469', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Miscellaneous ACH Debit'),
    '470': TypeCode('470', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Check Paid'),
    '471': TypeCode('471', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Check Paid – Cumulative MTD'),
    '472': TypeCode('472', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Cumulative** Checks Paid'),
    '474': TypeCode('474', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Certified Check Debit'),
    '475': TypeCode('475', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Check Paid'),
    '476': TypeCode('476', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Federal Reserve Bank Letter Debit'),
    '477': TypeCode('477', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Bank Originated Debit'),
    '478': TypeCode('478', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'List Post Debits'),
    '479': TypeCode('479', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'List Post Debit'),
    '480': TypeCode('480', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Loan Payments'),
    '481': TypeCode('481', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Individual Loan Payment'),
    '482': TypeCode('482', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Bank-Originated Debits'),
    '484': TypeCode('484', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Draft'),
    '485': TypeCode('485', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'DTC Debit'),
    '486': TypeCode('486', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Cash Letter Debits'),
    '487': TypeCode('487', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Cash Letter Debit'),
    '489': TypeCode('489', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Cash Letter Adjustment'),
    '490': TypeCode('490', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Outgoing Money Transfers'),
    '491': TypeCode('491', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Individual Outgoing Internal Money Transfer'),
    '493': TypeCode('493', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Customer Terminal Initiated Money Transfer'),
    '495': TypeCode('495', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Outgoing Money Transfer'),
    '496': TypeCode('496', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Money Transfer Adjustment'),
    '498': TypeCode('498', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Compensation'),
    '500': TypeCode('500', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Automatic Transfer Debits'),
    '501': TypeCode('501', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Individual Automatic Transfer Debit'),
    '502': TypeCode('502', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Bond Operations Debit'),
    '505': TypeCode('505', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Book Transfer Debits'),
    '506': TypeCode('506', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Book Transfer Debit'),
    '507': TypeCode('507', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total International Money Transfer Debits'),
    '508': TypeCode('508', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Individual International Money Transfer Debits'),
    '510': TypeCode('510', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total International Debits'),
    '512': TypeCode('512', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Letter of Credit Debit'),
    '513': TypeCode('513', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Letter of Credit'),
    '514': TypeCode('514', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Foreign Exchange Debit'),
    '515': TypeCode('515', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Letters of Credit'),
    '516': TypeCode('516', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Foreign Remittance Debit'),
    '518': TypeCode('518', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Foreign Collection Debit'),
    '522': TypeCode('522', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Foreign Checks Paid'),
    '524': TypeCode('524', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Commission'),
    '526': TypeCode('526', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'International Money Market Trading'),
    '527': TypeCode('527', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Standing Order'),
    '529': TypeCode('529', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Miscellaneous International Debit'),
    '530': TypeCode('530', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Security Debits'),
    '531': TypeCode('531', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Securities Purchased'),
    '532': TypeCode('532', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Amount of Securities Purchased'),
    '533': TypeCode('533', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Security Collection Debit'),
    '534': TypeCode('534', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Miscellaneous Securities DB – FF'),
    '535': TypeCode('535', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Purchase of Equity Securities'),
    '536': TypeCode('536', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Miscellaneous Securities Debit – CHF'),
    '537': TypeCode('537', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Collection Debit'),
    '538': TypeCode('538', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Matured Repurchase Order'),
    '539': TypeCode('539', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Bankers’ Acceptances Debit'),
    '540': TypeCode('540', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Coupon Collection Debit'),
    '541': TypeCode('541', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Bankers’ Acceptances'),
    '542': TypeCode('542', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Purchase of Debt Securities'),
    '543': TypeCode('543', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Domestic Collection'),
    '544': TypeCode('544', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Interest/Matured Principal Payment'),
    '546': TypeCode('546', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Commercial paper'),
    '547': TypeCode('547', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Capital Change'),
    '548': TypeCode('548', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Savings Bonds Sales Adjustment'),
    '549': TypeCode('549', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Miscellaneous Security Debit'),
    '550': TypeCode('550', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Deposited Items Returned'),
    '551': TypeCode('551', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Credit Reversals'),
    '552': TypeCode('552', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Credit Reversal'),
    '554': TypeCode('554', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Posting Error Correction Debit'),
    '555': TypeCode('555', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Deposited Item Returned'),
    '556': TypeCode('556', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total ACH Return Items'),
    '557': TypeCode('557', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Individual ACH Return Item'),
    '558': TypeCode('558', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'ACH Reversal Debit'),
    '560': TypeCode('560', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Rejected Debits'),
    '561': TypeCode('561', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Individual Rejected Debit'),
    '563': TypeCode('563', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Overdraft'),
    '564': TypeCode('564', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Overdraft Fee'),
    '566': TypeCode('566', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Return Item'),
    '567': TypeCode('567', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Return Item Fee'),
    '568': TypeCode('568', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Return Item Adjustment'),
    '570': TypeCode('570', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total ZBA Debits'),
    '574': TypeCode('574', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Cumulative ZBA Debits'),
    '575': TypeCode('575', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'ZBA Debit'),
    '577': TypeCode('577', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'ZBA Debit Transfer'),
    '578': TypeCode('578', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'ZBA Debit Adjustment'),
    '580': TypeCode('580', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Controlled Disbursing Debits'),
    '581': TypeCode('581', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Individual Controlled Disbursing Debit'),
    '583': TypeCode('583', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Disbursing Checks Paid – Early Amount'),
    '584': TypeCode('584', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Disbursing Checks Paid – Later Amount'),
    '585': TypeCode('585', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Disbursing Funding Requirement'),
    '586': TypeCode('586', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'FRB Presentment Estimate (Fed Estimate)'),
    '587': TypeCode('587', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Late Debits (After Notification)'),
    '588': TypeCode('588', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Disbursing Checks Paid-Last Amount'),
    '590': TypeCode('590', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total DTC Debits'),
    '594': TypeCode('594', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total ATM Debits'),
    '595': TypeCode('595', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'ATM Debit'),
    '596': TypeCode('596', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total APR Debits'),
    '597': TypeCode('597', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'ARP Debit'),
    '601': TypeCode('601', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Estimated Total Disbursement'),
    '602': TypeCode('602', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Adjusted Total Disbursement'),
    '610': TypeCode('610', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Funds Required'),
    '611': TypeCode('611', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Wire Transfers Out- CHF'),
    '612': TypeCode('612', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Wire Transfers Out – FF'),
    '613': TypeCode('613', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total International Debit – CHF'),
    '614': TypeCode('614', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total International Debit – FF'),
    '615': TypeCode('615', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Federal Reserve Bank – Commercial Bank Debit'),
    '616': TypeCode('616', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Federal Reserve Bank – Commercial Bank Debit'),
    '617': TypeCode('617', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Securities Purchased – CHF'),
    '618': TypeCode('618', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Securities Purchased – FF'),
    '621': TypeCode('621', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Broker Debits – CHF'),
    '622': TypeCode('622', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Broker Debit'),
    '623': TypeCode('623', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Broker Debits – FF'),
    '625': TypeCode('625', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Broker Debits'),
    '626': TypeCode('626', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Fed Funds Purchased'),
    '627': TypeCode('627', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Fed Funds Purchased'),
    '628': TypeCode('628', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Cash Center Debits'),
    '629': TypeCode('629', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Cash Center Debit'),
    '630': TypeCode('630', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Debit Adjustments'),
    '631': TypeCode('631', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Debit Adjustment'),
    '632': TypeCode('632', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Trust Debits'),
    '633': TypeCode('633', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Trust Debit'),
    '634': TypeCode('634', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'YTD Adjustment Debit'),
    '640': TypeCode('640', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Escrow Debits'),
    '641': TypeCode('641', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Individual Escrow Debit'),
    '644': TypeCode('644', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Individual Back Value Debit'),
    '646': TypeCode('646', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Transfer Calculation Debit'),
    '650': TypeCode('650', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Investments Purchased'),
    '651': TypeCode('651', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Individual Investment purchased'),
    '654': TypeCode('654', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Interest Debit'),
    '655': TypeCode('655', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Investment Interest Debits'),
    '656': TypeCode('656', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Sweep Principal Buy'),
    '657': TypeCode('657', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Futures Debit'),
    '658': TypeCode('658', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Principal Payments Debit'),
    '659': TypeCode('659', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Interest Adjustment Debit'),
    '661': TypeCode('661', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Account Analysis Fee'),
    '662': TypeCode('662', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Correspondent Collection Debit'),
    '663': TypeCode('663', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Correspondent Collection Adjustment'),
    '664': TypeCode('664', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Loan Participation'),
    '665': TypeCode('665', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Intercept Debits'),
    '666': TypeCode('666', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Currency and Coin Shipped'),
    '667': TypeCode('667', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Food Stamp Letter'),
    '668': TypeCode('668', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Food Stamp Adjustment'),
    '669': TypeCode('669', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Clearing Settlement Debit'),
    '670': TypeCode('670', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Back Value Debits'),
    '672': TypeCode('672', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Back Value Adjustment'),
    '673': TypeCode('673', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Customer Payroll'),
    '674': TypeCode('674', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'FRB Statement Recap'),
    '676': TypeCode('676', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Savings Bond Letter or Adjustment'),
    '677': TypeCode('677', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Treasury Tax and Loan Debit'),
    '678': TypeCode('678', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Transfer of Treasury Debit'),
    '679': TypeCode('679', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'FRB Government Checks Cash Letter Debit'),
    '681': TypeCode('681', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'FRB Government Check Adjustment'),
    '682': TypeCode('682', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'FRB Postal Money Order Debit'),
    '683': TypeCode('683', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'FRB Postal Money Order Adjustment'),
    '684': TypeCode('684', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'FRB Cash Letter Auto Charge Debit'),
    '685': TypeCode('685', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Universal Debits'),
    '686': TypeCode('686', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'FRB Cash Letter Auto Charge Adjustment'),
    '687': TypeCode('687', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'FRB Fine-Sort Cash Letter Debit'),
    '688': TypeCode('688', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'FRB Fine-Sort Adjustment'),
    '689': TypeCode('689', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'FRB Freight Payment Debits'),
    '690': TypeCode('690', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Total Miscellaneous Debits'),
    '691': TypeCode('691', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Universal Debit'),
    '692': TypeCode('692', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Freight Payment Debit'),
    '693': TypeCode('693', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Itemized Debit Over $10,000'),
    '694': TypeCode('694', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Deposit Reversal'),
    '695': TypeCode('695', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Deposit Correction Debit'),
    '696': TypeCode('696', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Regular Collection Debit'),
    '697': TypeCode('697', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Cumulative** Debits'),
    '698': TypeCode('698', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Miscellaneous Fees'),
    '699': TypeCode('699', TypeCodeTransaction.debit, TypeCodeLevel.detail, 'Miscellaneous Debit'),
    '701': TypeCode('701', None, TypeCodeLevel.status, 'Principal Loan Balance'),
    '703': TypeCode('703', None, TypeCodeLevel.status, 'Available Commitment Amount'),
    '705': TypeCode('705', None, TypeCodeLevel.status, 'Payment Amount Due'),
    '707': TypeCode('707', None, TypeCodeLevel.status, 'Principal Amount Past Due'),
    '709': TypeCode('709', None, TypeCodeLevel.status, 'Interest Amount Past Due'),
    '720': TypeCode('720', TypeCodeTransaction.credit, TypeCodeLevel.summary, 'Total Loan Payment'),
    '721': TypeCode('721', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Amount Applied to Interest'),
    '722': TypeCode('722', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Amount Applied to Principal'),
    '723': TypeCode('723', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Amount Applied to Escrow'),
    '724': TypeCode('724', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Amount Applied to Late Charges'),
    '725': TypeCode('725', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Amount Applied to Buydown'),
    '726': TypeCode('726', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Amount Applied to Misc. Fees'),
    '727': TypeCode('727', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Amount Applied to Deferred Interest Detail'),
    '728': TypeCode('728', TypeCodeTransaction.credit, TypeCodeLevel.detail, 'Amount Applied to Service Charge'),
    '760': TypeCode('760', TypeCodeTransaction.debit, TypeCodeLevel.summary, 'Loan Disbursement'),
    '890': TypeCode('890', TypeCodeTransaction.misc, TypeCodeLevel.detail, 'Contains Non-monetary Information'),
}

# -*- coding: utf-8 -*-