Class: Mws::Apis::Feeds::Shipping::Restriction
- Inherits:
-
Object
- Object
- Mws::Apis::Feeds::Shipping::Restriction
- Defined in:
- lib/mws/apis/feeds/shipping.rb
Instance Attribute Summary collapse
-
#option ⇒ Object
readonly
Returns the value of attribute option.
-
#restricted ⇒ Object
readonly
Returns the value of attribute restricted.
Instance Method Summary collapse
-
#initialize(option, restricted = true) ⇒ Restriction
constructor
A new instance of Restriction.
- #to_xml(name = 'ShippingOverride', parent = nil) ⇒ Object
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
#option ⇒ Object (readonly)
Returns the value of attribute option.
80 81 82 |
# File 'lib/mws/apis/feeds/shipping.rb', line 80 def option @option end |
#restricted ⇒ Object (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 |