<commit_before>module ACH::Records
  class BatchHeader < Record
    @fields = []
    
    const_field :record_type, '5'
    
    # TODO: This needs to be changed to reflect whether credits, debits or both.
    const_field :service_class_code, '200'
    field :company_name, String, lambda { |f| left_justify(f, 16)}
    field :company_discretionary_data, String,
        lambda { |f| left_justify(f, 20)}, ''
    field :company_identification, String,
        lambda {|f| '1' + f}, nil, /\A\d{9}\Z/,
        'Company Tax ID'
    #TODO Change this to CCD, allow being set as a default/preference?
    const_field :standard_entry_class_code, 'PPD'
    field :company_entry_description, String,
        lambda { |f| left_justify(f, 10)}
    field :company_descriptive_date, Time,
        lambda { |f| f.strftime('%y%m%d')},
        lambda { Time.now }
    field :effective_entry_date, Time,
        lambda { |f| f.strftime('%y%m%d')}
    const_field :settlement_date, '   '
    const_field :originator_status_code, '1'
    field :originating_dfi_identification, String,<commit_msg>Changed entry class code to CCD<commit_after>module ACH::Records
  class BatchHeader < Record
    @fields = []
    
    const_field :record_type, '5'
    
    # TODO: This needs to be changed to reflect whether credits, debits or both.
    const_field :service_class_code, '200'
    field :company_name, String, lambda { |f| left_justify(f, 16)}
    field :company_discretionary_data, String,
        lambda { |f| left_justify(f, 20)}, ''
    field :company_identification, String,
        lambda {|f| '1' + f}, nil, /\A\d{9}\Z/,
        'Company Tax ID'
    #TODO Allow being set as a default/preference?
    const_field :standard_entry_class_code, 'CCD'
    field :company_entry_description, String,
        lambda { |f| left_justify(f, 10)}
    field :company_descriptive_date, Time,
        lambda { |f| f.strftime('%y%m%d')},
        lambda { Time.now }
    field :effective_entry_date, Time,
        lambda { |f| f.strftime('%y%m%d')}
    const_field :settlement_date, '   '
    const_field :originator_status_code, '1'
    field :originating_dfi_identification, String,
{'fraction_non_alphanumeric': 0.1202414113277623, 'fraction_numerical': 0.012070566388115135, 'mean_word_length': 3.3273092369477912, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2112542', 'n_tokens_mistral': 751, 'n_tokens_neox': 720, 'n_words': 188}