class DHL::Ecommerce::Product

Constants

CATEGORIES
TYPES

Attributes

category[R]
id[R]
name[R]
type[R]

Public Class Methods

new(attributes = {}) click to toggle source
Calls superclass method DHL::Ecommerce::Base::new
# File lib/dhl/ecommerce/product.rb, line 24
def initialize(attributes = {})
  super attributes

  unless attributes.empty?
    @category = CATEGORIES.key(attributes[:category]) if attributes[:category]
    @type = TYPES.key(attributes[:class]) if attributes[:class]
  end
end