Class: Elibri::ONIX::Release_3_0::PriceIdentifier
- Inherits:
-
Object
- Object
- Elibri::ONIX::Release_3_0::PriceIdentifier
- Defined in:
- lib/elibri_onix/onix_3_0/price_identifier.rb
Instance Attribute Summary collapse
-
#to_xml ⇒ Object
Returns the value of attribute to_xml.
-
#type ⇒ Object
Returns the value of attribute type.
-
#type_name ⇒ Object
Returns the value of attribute type_name.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(data) ⇒ PriceIdentifier
constructor
A new instance of PriceIdentifier.
Constructor Details
#initialize(data) ⇒ PriceIdentifier
Returns a new instance of PriceIdentifier.
8 9 10 11 12 13 |
# File 'lib/elibri_onix/onix_3_0/price_identifier.rb', line 8 def initialize(data) @to_xml = data.to_s @type = data.at_css('PriceIDType')&.text @type_name = data.at_css("IDTypeName")&.text @value = data.at_css("IDValue")&.text end |
Instance Attribute Details
#to_xml ⇒ Object
Returns the value of attribute to_xml.
6 7 8 |
# File 'lib/elibri_onix/onix_3_0/price_identifier.rb', line 6 def to_xml @to_xml end |
#type ⇒ Object
Returns the value of attribute type.
6 7 8 |
# File 'lib/elibri_onix/onix_3_0/price_identifier.rb', line 6 def type @type end |
#type_name ⇒ Object
Returns the value of attribute type_name.
6 7 8 |
# File 'lib/elibri_onix/onix_3_0/price_identifier.rb', line 6 def type_name @type_name end |
#value ⇒ Object
Returns the value of attribute value.
6 7 8 |
# File 'lib/elibri_onix/onix_3_0/price_identifier.rb', line 6 def value @value end |