Class: Mws::Apis::Feeds::Shipping::Restriction

Inherits:
Object
  • Object
show all
Defined in:
lib/mws/apis/feeds/shipping.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(option, restricted = true) ⇒ Restriction

Returns a new instance of Restriction.



82
83
84
85
# File 'lib/mws/apis/feeds/shipping.rb', line 82

def initialize(option, restricted=true)
  @option = option
  @restricted = restricted
end

Instance Attribute Details

#optionObject (readonly)

Returns the value of attribute option.



80
81
82
# File 'lib/mws/apis/feeds/shipping.rb', line 80

def option
  @option
end

#restrictedObject (readonly)

Returns the value of attribute restricted.



80
81
82
# File 'lib/mws/apis/feeds/shipping.rb', line 80

def restricted
  @restricted
end

Instance Method Details

#to_xml(name = 'ShippingOverride', parent = nil) ⇒ Object



87
88
89
90
91
92
# File 'lib/mws/apis/feeds/shipping.rb', line 87

def to_xml(name='ShippingOverride', parent=nil)
  Mws::Serializer.tree name, parent do |xml|
    xml.ShipOption @option
    xml.IsShippingRestricted @restricted
  end
end