Class: Mws::Apis::Feeds::Product::Dimensions

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#heightObject

Returns the value of attribute height.



107
108
109
# File 'lib/mws/apis/feeds/product.rb', line 107

def height
  @height
end

#lengthObject

Returns the value of attribute length.



107
108
109
# File 'lib/mws/apis/feeds/product.rb', line 107

def length
  @length
end

#weightObject

Returns the value of attribute weight.



107
108
109
# File 'lib/mws/apis/feeds/product.rb', line 107

def weight
  @weight
end

#widthObject

Returns the value of attribute width.



107
108
109
# File 'lib/mws/apis/feeds/product.rb', line 107

def width
  @width
end

Instance Method Details

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



109
110
111
112
113
114
115
116
# File 'lib/mws/apis/feeds/product.rb', line 109

def to_xml(name='Dimensions', parent=nil)
  Mws::Serializer.tree name, parent do |xml|
    @length.to_xml 'Length', xml unless @length.nil?
    @width.to_xml 'Width', xml unless @width.nil?
    @height.to_xml 'Height', xml unless @height.nil?
    @weight.to_xml 'Weight', xml unless @weight.nil?
  end
end