Class: Postmen::Item

Inherits:
Object
  • Object
show all
Includes:
Common
Defined in:
lib/postmen/item.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Common

#to_hash

Constructor Details

#initialize(options) ⇒ Item

Returns a new instance of Item.



14
15
16
17
18
19
20
21
22
23
# File 'lib/postmen/item.rb', line 14

def initialize(options)
  @description = options[:description]
  @quantity = options[:quantity]
  @price = options[:price]
  @weight = options[:weight]
  @item_id = options[:item_id]
  @origin_country = options[:origin_country]
  @sku = options[:sku]
  @hs_code = options[:hs_code]
end

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description.



5
6
7
# File 'lib/postmen/item.rb', line 5

def description
  @description
end

#hs_codeObject (readonly)

Returns the value of attribute hs_code.



5
6
7
# File 'lib/postmen/item.rb', line 5

def hs_code
  @hs_code
end

#item_idObject (readonly)

Returns the value of attribute item_id.



5
6
7
# File 'lib/postmen/item.rb', line 5

def item_id
  @item_id
end

#origin_countryObject (readonly)

Returns the value of attribute origin_country.



5
6
7
# File 'lib/postmen/item.rb', line 5

def origin_country
  @origin_country
end

#priceObject (readonly)

Returns the value of attribute price.



5
6
7
# File 'lib/postmen/item.rb', line 5

def price
  @price
end

#quantityObject (readonly)

Returns the value of attribute quantity.



5
6
7
# File 'lib/postmen/item.rb', line 5

def quantity
  @quantity
end

#skuObject (readonly)

Returns the value of attribute sku.



5
6
7
# File 'lib/postmen/item.rb', line 5

def sku
  @sku
end

#weightObject (readonly)

Returns the value of attribute weight.



5
6
7
# File 'lib/postmen/item.rb', line 5

def weight
  @weight
end