Class: Ach::BatchHeaderRecord
- Inherits:
-
Object
- Object
- Ach::BatchHeaderRecord
- Defined in:
- lib/ach/parser.rb,
lib/ach/creator.rb
Instance Attribute Summary collapse
-
#ach_file_id ⇒ Object
Returns the value of attribute ach_file_id.
-
#batch_number ⇒ Object
Returns the value of attribute batch_number.
-
#call_encode ⇒ Object
Returns the value of attribute call_encode.
-
#company_desc_date ⇒ Object
Returns the value of attribute company_desc_date.
-
#company_descriptive_date ⇒ Object
Returns the value of attribute company_descriptive_date.
-
#company_discretionary_data ⇒ Object
Returns the value of attribute company_discretionary_data.
-
#company_entry_desc ⇒ Object
Returns the value of attribute company_entry_desc.
-
#company_entry_description ⇒ Object
Returns the value of attribute company_entry_description.
-
#company_id ⇒ Object
Returns the value of attribute company_id.
-
#company_name ⇒ Object
Returns the value of attribute company_name.
-
#effective_entry_date ⇒ Object
Returns the value of attribute effective_entry_date.
-
#originator_status_code ⇒ Object
Returns the value of attribute originator_status_code.
-
#record_type ⇒ Object
Returns the value of attribute record_type.
-
#routing_number ⇒ Object
Returns the value of attribute routing_number.
-
#sec_code ⇒ Object
Returns the value of attribute sec_code.
-
#service_class_code ⇒ Object
Returns the value of attribute service_class_code.
-
#settlement_date ⇒ Object
Returns the value of attribute settlement_date.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ BatchHeaderRecord
constructor
A new instance of BatchHeaderRecord.
Constructor Details
#initialize(options = {}) ⇒ BatchHeaderRecord
Returns a new instance of BatchHeaderRecord.
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 |
# File 'lib/ach/creator.rb', line 240 def initialize(={}) @record_type = [:record_type] @service_class_code = [:service_class_code] @company_name = [:company_name] @company_discretionary_data = [:company_discretionary_data] @company_id = [:company_id] @sec_code = [:standard_entry_class_code] @company_entry_desc = [:company_entry_description] @company_desc_date = [:company_descriptive_date] @posting_date = [:effective_entry_date] @batch_number = [:batch_number] @originator_status_code = [:originator_status_code] @wellsfargo_routing_number = [:wellsfargo_routing_number] @ach_file_id = [:ach_file_id] @write_to_file = [:write_to_file] @call_encode = encode end |
Instance Attribute Details
#ach_file_id ⇒ Object
Returns the value of attribute ach_file_id.
239 240 241 |
# File 'lib/ach/creator.rb', line 239 def ach_file_id @ach_file_id end |
#batch_number ⇒ Object
Returns the value of attribute batch_number.
238 239 240 |
# File 'lib/ach/creator.rb', line 238 def batch_number @batch_number end |
#call_encode ⇒ Object
Returns the value of attribute call_encode.
239 240 241 |
# File 'lib/ach/creator.rb', line 239 def call_encode @call_encode end |
#company_desc_date ⇒ Object
Returns the value of attribute company_desc_date.
239 240 241 |
# File 'lib/ach/creator.rb', line 239 def company_desc_date @company_desc_date end |
#company_descriptive_date ⇒ Object
Returns the value of attribute company_descriptive_date.
238 239 240 |
# File 'lib/ach/creator.rb', line 238 def company_descriptive_date @company_descriptive_date end |
#company_discretionary_data ⇒ Object
Returns the value of attribute company_discretionary_data.
239 240 241 |
# File 'lib/ach/creator.rb', line 239 def company_discretionary_data @company_discretionary_data end |
#company_entry_desc ⇒ Object
Returns the value of attribute company_entry_desc.
237 238 239 |
# File 'lib/ach/creator.rb', line 237 def company_entry_desc @company_entry_desc end |
#company_entry_description ⇒ Object
Returns the value of attribute company_entry_description.
239 240 241 |
# File 'lib/ach/creator.rb', line 239 def company_entry_description @company_entry_description end |
#company_id ⇒ Object
Returns the value of attribute company_id.
238 239 240 |
# File 'lib/ach/creator.rb', line 238 def company_id @company_id end |
#company_name ⇒ Object
Returns the value of attribute company_name.
237 238 239 |
# File 'lib/ach/creator.rb', line 237 def company_name @company_name end |
#effective_entry_date ⇒ Object
Returns the value of attribute effective_entry_date.
238 239 240 |
# File 'lib/ach/creator.rb', line 238 def effective_entry_date @effective_entry_date end |
#originator_status_code ⇒ Object
Returns the value of attribute originator_status_code.
238 239 240 |
# File 'lib/ach/creator.rb', line 238 def originator_status_code @originator_status_code end |
#record_type ⇒ Object
Returns the value of attribute record_type.
237 238 239 |
# File 'lib/ach/creator.rb', line 237 def record_type @record_type end |
#routing_number ⇒ Object
Returns the value of attribute routing_number.
238 239 240 |
# File 'lib/ach/creator.rb', line 238 def routing_number @routing_number end |
#sec_code ⇒ Object
Returns the value of attribute sec_code.
237 238 239 |
# File 'lib/ach/creator.rb', line 237 def sec_code @sec_code end |
#service_class_code ⇒ Object
Returns the value of attribute service_class_code.
237 238 239 |
# File 'lib/ach/creator.rb', line 237 def service_class_code @service_class_code end |
#settlement_date ⇒ Object
Returns the value of attribute settlement_date.
239 240 241 |
# File 'lib/ach/creator.rb', line 239 def settlement_date @settlement_date end |
Class Method Details
.decode(record, processor) ⇒ Object
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/ach/parser.rb', line 50 def self.decode(record) bh = {} bh[:record_type] = record[0].chr bh[:service_class_code] = record[1,3] bh[:company_name] = record[4,16] bh[:company_discretionary_data] = record[20,20] bh[:company_id] = record[40,10] bh[:standard_entry_class_code] = record[50,3] bh[:company_entry_description] = record[53,10] bh[:company_descriptive_date] = record[63,6] bh[:effective_entry_date] = record[69,6] bh[:settlement_date] = record[75,3] bh[:originator_status_code] = record[78,1] bh[:wellsfargo_routing_number] = record[79,8] bh[:batch_number] = record[87,7] return bh end |