Class: ACH::Records::CtxEntryDetail
- Inherits:
-
EntryDetail
- Object
- Record
- EntryDetail
- ACH::Records::CtxEntryDetail
- Defined in:
- lib/ach/records/entry_detail.rb
Constant Summary
Constants inherited from EntryDetail
EntryDetail::CREDIT_RECORD_TRANSACTION_CODE_ENDING_DIGITS
Constants included from FieldIdentifiers
FieldIdentifiers::ENCODING_OPTIONS
Instance Attribute Summary collapse
-
#addenda ⇒ Object
readonly
Returns the value of attribute addenda.
Attributes inherited from EntryDetail
Instance Method Summary collapse
- #addenda_records? ⇒ Boolean
-
#initialize ⇒ CtxEntryDetail
constructor
A new instance of CtxEntryDetail.
- #to_ach ⇒ Object
Methods inherited from EntryDetail
#amount_value, #credit?, #debit?
Methods inherited from Record
Methods included from FieldIdentifiers
#const_field, #field, #left_justify, #spaceless_routing_field
Constructor Details
#initialize ⇒ CtxEntryDetail
Returns a new instance of CtxEntryDetail.
56 57 58 |
# File 'lib/ach/records/entry_detail.rb', line 56 def initialize @addenda = [] end |
Instance Attribute Details
#addenda ⇒ Object (readonly)
Returns the value of attribute addenda.
54 55 56 |
# File 'lib/ach/records/entry_detail.rb', line 54 def addenda @addenda end |
Instance Method Details
#addenda_records? ⇒ Boolean
60 61 62 |
# File 'lib/ach/records/entry_detail.rb', line 60 def addenda_records? return !self.addenda.empty? end |
#to_ach ⇒ Object
64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/ach/records/entry_detail.rb', line 64 def to_ach self.addenda_record_indicator = (self.addenda.empty? ? 0 : 1) self.number_of_addenda_records = self.addenda.length ach_string = super self.addenda.each {|a| a.entry_detail_sequence_number = self.trace_number ach_string << "\r\n" + a.to_ach } return ach_string end |