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.
55 56 57 |
# File 'lib/ach/records/entry_detail.rb', line 55 def initialize @addenda = [] end |
Instance Attribute Details
#addenda ⇒ Object (readonly)
Returns the value of attribute addenda.
53 54 55 |
# File 'lib/ach/records/entry_detail.rb', line 53 def addenda @addenda end |
Instance Method Details
#addenda_records? ⇒ Boolean
59 60 61 |
# File 'lib/ach/records/entry_detail.rb', line 59 def addenda_records? return !self.addenda.empty? end |
#to_ach ⇒ Object
63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/ach/records/entry_detail.rb', line 63 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 |