Class: MoneyS3::Parsers::MessageType
- Inherits:
-
Object
- Object
- MoneyS3::Parsers::MessageType
show all
- Includes:
- ParserCore::BaseParser
- Defined in:
- lib/money_s3/parsers/message_type.rb
Direct Known Subclasses
Import, Import2, MsgBanDoklType, MsgBankUcetPokladnaType, MsgCinnostType, MsgClenDPHType, MsgFaktDpptype, MsgFaktPolozType, MsgFaktType, MsgFirmaType, MsgIntDoklType, MsgInvDoklType, MsgKmKartaType, MsgKomponentaType, MsgMzdaType, MsgObjType, MsgPohledavkaType, MsgPokDoklType, MsgPolozType, MsgPredkontaceDEType, MsgPredkontaceType, MsgPrevodkaType, MsgSklDoklType, MsgStrediskoType, MsgUcOsnovType, MsgUcPohybType, MsgZakazkaType, MsgZasobaType, MsgZauctovaniDPHDetype, MsgZauctovaniDPHType, MsgZavazekType
Instance Method Summary
collapse
Instance Method Details
#data ⇒ Object
22
23
24
|
# File 'lib/money_s3/parsers/message_type.rb', line 22
def data
at 'Data'
end
|
#data_attributes ⇒ Object
26
27
28
|
# File 'lib/money_s3/parsers/message_type.rb', line 26
def data_attributes
attributes_at 'Data'
end
|
#error_info ⇒ Object
18
19
20
|
# File 'lib/money_s3/parsers/message_type.rb', line 18
def error_info
array_of_at(ErrorInfoType, ['ErrorInfo'])
end
|
#reference ⇒ Object
14
15
16
|
# File 'lib/money_s3/parsers/message_type.rb', line 14
def reference
array_of_at(String, ['Reference', 'ID'])
end
|
#status ⇒ Object
6
7
8
|
# File 'lib/money_s3/parsers/message_type.rb', line 6
def status
at 'Status'
end
|
#status_attributes ⇒ Object
10
11
12
|
# File 'lib/money_s3/parsers/message_type.rb', line 10
def status_attributes
attributes_at 'Status'
end
|
#to_h ⇒ Object
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# File 'lib/money_s3/parsers/message_type.rb', line 30
def to_h
hash = {}
hash[:attributes] = attributes
hash[:status] = status if has? 'Status'
hash[:status_attributes] = status_attributes if has? 'Status'
hash[:reference] = reference if has? 'Reference'
hash[:error_info] = error_info.map(&:to_h) if has? 'ErrorInfo'
hash[:data] = data if has? 'Data'
hash[:data_attributes] = data_attributes if has? 'Data'
hash
end
|