class Elibri::ONIX::Release_3_0::SalesRestriction
Constants
- ATTRIBUTES
- RELATIONS
Attributes
end_date[RW]
outlet_name[RW]
to_xml[RW]
type[RW]
Public Class Methods
new(data)
click to toggle source
# File lib/elibri_onix/onix_3_0/sales_restriction.rb, line 24 def initialize(data) @to_xml = data.to_s @type = data.at_css('SalesRestrictionType').try(:text).try(:to_i) if data.at_css('SalesOutlet') @outlet_name = data.at_css('SalesOutlet').at_css('SalesOutletName').try(:text) end @end_date = Date.parse(data.at_css('EndDate').try(:text)) if data.at_css('EndDate') end