Class: Ach::EntryDetailRecord
- Inherits:
-
Object
- Object
- Ach::EntryDetailRecord
- Defined in:
- lib/ach/parser.rb,
lib/ach/creator.rb
Instance Attribute Summary collapse
-
#ach_batch_id ⇒ Object
Returns the value of attribute ach_batch_id.
-
#addenda_record_indicator ⇒ Object
Returns the value of attribute addenda_record_indicator.
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#db_entry_amount ⇒ Object
Returns the value of attribute db_entry_amount.
-
#disc_data ⇒ Object
Returns the value of attribute disc_data.
-
#individual_id ⇒ Object
Returns the value of attribute individual_id.
-
#individual_name ⇒ Object
Returns the value of attribute individual_name.
-
#receiving_dfi_acc_num ⇒ Object
Returns the value of attribute receiving_dfi_acc_num.
-
#receiving_dfi_routing_num ⇒ Object
Returns the value of attribute receiving_dfi_routing_num.
-
#record_type ⇒ Object
Returns the value of attribute record_type.
-
#routing_number ⇒ Object
Returns the value of attribute routing_number.
-
#routing_number_check ⇒ Object
Returns the value of attribute routing_number_check.
-
#rt_num_check ⇒ Object
Returns the value of attribute rt_num_check.
-
#settlement_id ⇒ Object
Returns the value of attribute settlement_id.
-
#trace_number ⇒ Object
Returns the value of attribute trace_number.
-
#transaction_code ⇒ Object
Returns the value of attribute transaction_code.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ EntryDetailRecord
constructor
A new instance of EntryDetailRecord.
Constructor Details
#initialize(options = {}) ⇒ EntryDetailRecord
Returns a new instance of EntryDetailRecord.
313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 |
# File 'lib/ach/creator.rb', line 313 def initialize( = {}) @record_type = '6' @transaction_code = [:transaction_code] @receiving_dfi_routing_num = [:receiving_dfi_routing_num] @receiving_dfi_acc_num = [:receiving_dfi_acc_num] @rt_num_check = [:rt_num_check] @amount = [:amount] @individual_id = [:individual_id] @individual_name = [:individual_name] @routing_number = [:routing_number] @trace_number = [:trace_number] @ach_batch_id = [:ach_batch_id] @settlement_id = [:settlement_id] @db_entry_amount = [:db_entry_amount] @write_to_file = [:write_to_file] encode end |
Instance Attribute Details
#ach_batch_id ⇒ Object
Returns the value of attribute ach_batch_id.
312 313 314 |
# File 'lib/ach/creator.rb', line 312 def ach_batch_id @ach_batch_id end |
#addenda_record_indicator ⇒ Object
Returns the value of attribute addenda_record_indicator.
312 313 314 |
# File 'lib/ach/creator.rb', line 312 def addenda_record_indicator @addenda_record_indicator end |
#amount ⇒ Object
Returns the value of attribute amount.
311 312 313 |
# File 'lib/ach/creator.rb', line 311 def amount @amount end |
#db_entry_amount ⇒ Object
Returns the value of attribute db_entry_amount.
312 313 314 |
# File 'lib/ach/creator.rb', line 312 def db_entry_amount @db_entry_amount end |
#disc_data ⇒ Object
Returns the value of attribute disc_data.
312 313 314 |
# File 'lib/ach/creator.rb', line 312 def disc_data @disc_data end |
#individual_id ⇒ Object
Returns the value of attribute individual_id.
311 312 313 |
# File 'lib/ach/creator.rb', line 311 def individual_id @individual_id end |
#individual_name ⇒ Object
Returns the value of attribute individual_name.
311 312 313 |
# File 'lib/ach/creator.rb', line 311 def individual_name @individual_name end |
#receiving_dfi_acc_num ⇒ Object
Returns the value of attribute receiving_dfi_acc_num.
310 311 312 |
# File 'lib/ach/creator.rb', line 310 def receiving_dfi_acc_num @receiving_dfi_acc_num end |
#receiving_dfi_routing_num ⇒ Object
Returns the value of attribute receiving_dfi_routing_num.
311 312 313 |
# File 'lib/ach/creator.rb', line 311 def receiving_dfi_routing_num @receiving_dfi_routing_num end |
#record_type ⇒ Object
Returns the value of attribute record_type.
310 311 312 |
# File 'lib/ach/creator.rb', line 310 def record_type @record_type end |
#routing_number ⇒ Object
Returns the value of attribute routing_number.
312 313 314 |
# File 'lib/ach/creator.rb', line 312 def routing_number @routing_number end |
#routing_number_check ⇒ Object
Returns the value of attribute routing_number_check.
310 311 312 |
# File 'lib/ach/creator.rb', line 310 def routing_number_check @routing_number_check end |
#rt_num_check ⇒ Object
Returns the value of attribute rt_num_check.
310 311 312 |
# File 'lib/ach/creator.rb', line 310 def rt_num_check @rt_num_check end |
#settlement_id ⇒ Object
Returns the value of attribute settlement_id.
312 313 314 |
# File 'lib/ach/creator.rb', line 312 def settlement_id @settlement_id end |
#trace_number ⇒ Object
Returns the value of attribute trace_number.
312 313 314 |
# File 'lib/ach/creator.rb', line 312 def trace_number @trace_number end |
#transaction_code ⇒ Object
Returns the value of attribute transaction_code.
310 311 312 |
# File 'lib/ach/creator.rb', line 310 def transaction_code @transaction_code end |
Class Method Details
.decode(record, processor) ⇒ Object
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/ach/parser.rb', line 70 def self.decode(record) ed = {} ed[:record_type] = record[0].chr ed[:transaction_code] = record[1,2] ed[:receiving_dfi_routing_number] = record[3,8] ed[:routing_number_check_digit] = record[11,1] ed[:receiving_dfi_account_number] = record[12,17] ed[:amount] = record[29,10] ed[:individual_id] = record[39,15] ed[:individual_name] = record[54,22] ed[:discretionary_data] = record[76,2] ed[:addenda_record_indicator] = record[78,1] ed[:trace_number] = record[79,15] return ed end |