Class: Elibri::ONIX::Release_3_0::StockQuantityCoded
- Inherits:
-
Object
- Object
- Elibri::ONIX::Release_3_0::StockQuantityCoded
- Defined in:
- lib/elibri_onix/onix_3_0/stock_quantity_coded.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#code_type ⇒ Object
Returns the value of attribute code_type.
-
#to_xml ⇒ Object
Returns the value of attribute to_xml.
Instance Method Summary collapse
-
#initialize(data) ⇒ StockQuantityCoded
constructor
A new instance of StockQuantityCoded.
Constructor Details
#initialize(data) ⇒ StockQuantityCoded
Returns a new instance of StockQuantityCoded.
8 9 10 11 12 |
# File 'lib/elibri_onix/onix_3_0/stock_quantity_coded.rb', line 8 def initialize(data) @to_xml = data.to_s @code_type = data.at_css('StockQuantityCodeType')&.text&.to_i @code = data.at_css('StockQuantityCode')&.text end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
6 7 8 |
# File 'lib/elibri_onix/onix_3_0/stock_quantity_coded.rb', line 6 def code @code end |
#code_type ⇒ Object
Returns the value of attribute code_type.
6 7 8 |
# File 'lib/elibri_onix/onix_3_0/stock_quantity_coded.rb', line 6 def code_type @code_type end |
#to_xml ⇒ Object
Returns the value of attribute to_xml.
6 7 8 |
# File 'lib/elibri_onix/onix_3_0/stock_quantity_coded.rb', line 6 def to_xml @to_xml end |