Class: Ach::FileHeaderRecord
- Inherits:
-
Object
- Object
- Ach::FileHeaderRecord
- Defined in:
- lib/ach/parser.rb,
lib/ach/creator.rb
Instance Attribute Summary collapse
-
#bank ⇒ Object
Returns the value of attribute bank.
-
#bank_name ⇒ Object
Returns the value of attribute bank_name.
-
#blocking_factor ⇒ Object
Returns the value of attribute blocking_factor.
-
#call_encode ⇒ Object
Returns the value of attribute call_encode.
-
#company_name ⇒ Object
Returns the value of attribute company_name.
-
#file_creation_date ⇒ Object
Returns the value of attribute file_creation_date.
-
#file_creation_time ⇒ Object
Returns the value of attribute file_creation_time.
-
#file_id ⇒ Object
Returns the value of attribute file_id.
-
#file_id_modifier ⇒ Object
Returns the value of attribute file_id_modifier.
-
#format_code ⇒ Object
Returns the value of attribute format_code.
-
#origination_bank ⇒ Object
Returns the value of attribute origination_bank.
-
#priority_code ⇒ Object
Returns the value of attribute priority_code.
-
#record_size ⇒ Object
Returns the value of attribute record_size.
-
#record_type ⇒ Object
Returns the value of attribute record_type.
-
#routing_number ⇒ Object
Returns the value of attribute routing_number.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ FileHeaderRecord
constructor
A new instance of FileHeaderRecord.
Constructor Details
#initialize(options = {}) ⇒ FileHeaderRecord
Returns a new instance of FileHeaderRecord.
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 |
# File 'lib/ach/creator.rb', line 183 def initialize(={}) @record_type = [:record_type] @priority_code = [:priority_code] @routing_number = [:routing_number] @file_id = [:file_id] @record_size = [:record_size] @blocking_factor = [:blocking_factor] @file_creation_date = [:file_creation_date] @file_creation_time = [:file_creation_time] @format_code = [:format_code] @company_name = [:company_name] @bank_name = [:bank_name] @write_to_file = [:write_to_file] @file_id_modifier = [:file_id_modifier] @origination_bank = [:origination_bank] @wellsfargo_routing_number = [:wellsfargo_routing_number] @call_encode = encode end |
Instance Attribute Details
#bank ⇒ Object
Returns the value of attribute bank.
181 182 183 |
# File 'lib/ach/creator.rb', line 181 def bank @bank end |
#bank_name ⇒ Object
Returns the value of attribute bank_name.
181 182 183 |
# File 'lib/ach/creator.rb', line 181 def bank_name @bank_name end |
#blocking_factor ⇒ Object
Returns the value of attribute blocking_factor.
181 182 183 |
# File 'lib/ach/creator.rb', line 181 def blocking_factor @blocking_factor end |
#call_encode ⇒ Object
Returns the value of attribute call_encode.
181 182 183 |
# File 'lib/ach/creator.rb', line 181 def call_encode @call_encode end |
#company_name ⇒ Object
Returns the value of attribute company_name.
181 182 183 |
# File 'lib/ach/creator.rb', line 181 def company_name @company_name end |
#file_creation_date ⇒ Object
Returns the value of attribute file_creation_date.
182 183 184 |
# File 'lib/ach/creator.rb', line 182 def file_creation_date @file_creation_date end |
#file_creation_time ⇒ Object
Returns the value of attribute file_creation_time.
182 183 184 |
# File 'lib/ach/creator.rb', line 182 def file_creation_time @file_creation_time end |
#file_id ⇒ Object
Returns the value of attribute file_id.
180 181 182 |
# File 'lib/ach/creator.rb', line 180 def file_id @file_id end |
#file_id_modifier ⇒ Object
Returns the value of attribute file_id_modifier.
180 181 182 |
# File 'lib/ach/creator.rb', line 180 def file_id_modifier @file_id_modifier end |
#format_code ⇒ Object
Returns the value of attribute format_code.
181 182 183 |
# File 'lib/ach/creator.rb', line 181 def format_code @format_code end |
#origination_bank ⇒ Object
Returns the value of attribute origination_bank.
181 182 183 |
# File 'lib/ach/creator.rb', line 181 def origination_bank @origination_bank end |
#priority_code ⇒ Object
Returns the value of attribute priority_code.
180 181 182 |
# File 'lib/ach/creator.rb', line 180 def priority_code @priority_code end |
#record_size ⇒ Object
Returns the value of attribute record_size.
180 181 182 |
# File 'lib/ach/creator.rb', line 180 def record_size @record_size end |
#record_type ⇒ Object
Returns the value of attribute record_type.
180 181 182 |
# File 'lib/ach/creator.rb', line 180 def record_type @record_type end |
#routing_number ⇒ Object
Returns the value of attribute routing_number.
180 181 182 |
# File 'lib/ach/creator.rb', line 180 def routing_number @routing_number end |
Class Method Details
.decode(record, processor) ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/ach/parser.rb', line 31 def self.decode(record) fh = {} fh[:record_type] = record[0].chr fh[:priority_code] = record[1,2] fh[:wellsfargo_routing_number] = record[4,9] fh[:file_id] = record[13,10] fh[:file_creation_date] = record[23,6] fh[:file_creation_time] = record[29,4] fh[:file_id_modifier] = record[33,1] fh[:record_size] = record[34,3] fh[:blocking_factor] = record[37,2] fh[:format_code] = record[39,1] fh[:origination_bank] = record[40,23] fh[:company_name] = record[63,23] return fh end |