lib/ach/file/header.rb in ach_builder-0.0.2 vs lib/ach/file/header.rb in ach_builder-0.2.1

- old
+ new

@@ -1,7 +1,25 @@ module ACH - class File::Header < Record + # An ACH::File::Header record is the first record of every ACH::File + # (in case the ACH::File::TransmissionHeader record is absent). + # + # == Fields: + # + # * record_type + # * priority_code + # * immediate_dest + # * immediate_origin + # * date + # * time + # * file_id_modifier + # * record_size + # * blocking_factor + # * format_code + # * immediate_dest_name + # * immediate_origin_name + # * reference_code + class File::Header < Record::Base fields :record_type, :priority_code, :immediate_dest, :immediate_origin, :date, @@ -12,12 +30,11 @@ :format_code, :immediate_dest_name, :immediate_origin_name, :reference_code - defaults :record_type => 1, + defaults :record_type => FILE_HEADER_RECORD_TYPE, :priority_code => 1, - :reference_code => '', :date => lambda{ Time.now.strftime("%y%m%d") }, :time => lambda{ Time.now.strftime("%H%M") }, :file_id_modifier => 'A', :record_size => RECORD_SIZE, :blocking_factor => BLOCKING_FACTOR,