Class: Elibri::ONIX::Release_3_0::PriceIdentifier

Inherits:
Object
  • Object
show all
Defined in:
lib/elibri_onix/onix_3_0/price_identifier.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_xmlObject

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

#typeObject

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_nameObject

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

#valueObject

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