Class: SepaFileParser::Pain001::Base
- Inherits:
-
Object
- Object
- SepaFileParser::Pain001::Base
- Defined in:
- lib/sepa_file_parser/pain001/base.rb
Instance Attribute Summary collapse
-
#group_header ⇒ Object
readonly
Returns the value of attribute group_header.
-
#payment_informations ⇒ Object
readonly
Returns the value of attribute payment_informations.
-
#xml_data ⇒ Object
readonly
Returns the value of attribute xml_data.
Instance Method Summary collapse
-
#initialize(xml_data) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(xml_data) ⇒ Base
Returns a new instance of Base.
8 9 10 11 12 13 14 15 |
# File 'lib/sepa_file_parser/pain001/base.rb', line 8 def initialize(xml_data) @xml_data = xml_data # CstmrCdtTrfInitn = Customer Credit Transaction Initiation grphdr = xml_data.xpath('CstmrCdtTrfInitn/GrpHdr') @group_header = SepaFileParser::GroupHeader.new(grphdr) payment_informations = xml_data.xpath('CstmrCdtTrfInitn/PmtInf') @payment_informations = payment_informations.map{ |x| PaymentInformation.new(x) } end |
Instance Attribute Details
#group_header ⇒ Object (readonly)
Returns the value of attribute group_header.
6 7 8 |
# File 'lib/sepa_file_parser/pain001/base.rb', line 6 def group_header @group_header end |
#payment_informations ⇒ Object (readonly)
Returns the value of attribute payment_informations.
6 7 8 |
# File 'lib/sepa_file_parser/pain001/base.rb', line 6 def payment_informations @payment_informations end |
#xml_data ⇒ Object (readonly)
Returns the value of attribute xml_data.
6 7 8 |
# File 'lib/sepa_file_parser/pain001/base.rb', line 6 def xml_data @xml_data end |