Class: Ebisu::Item

Inherits:
Object
  • Object
show all
Defined in:
lib/ebisu/models/item.rb

Defined Under Namespace

Classes: Availability

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hit) ⇒ Item

Returns a new instance of Item.



113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# File 'lib/ebisu/models/item.rb', line 113

def initialize(hit)
  @name = hit.dig('Name')
  @description = hit.dig('Description')
  @headline = hit.dig('Headline')
  @url = hit.dig('Url')
  @availability = Availability.new(hit.dig('Availability'))
  @code = hit.dig('Code')
  @person_id = hit.dig('PersonId')
  @product_id = hit.dig('ProductId')
  @price = Ebisu::Price.new(hit.dig('Price'))
  @price_label = Ebisu::PriceLabel.new(hit.dig('PriceLabel'))
  @jan_code = hit.dig('JanCode')
  @model = hit.dig('Model')
  @isbn_code = hit.dig('IsbnCode')
  @release_date = hit.dig('ReleaseDate')
  @image = Ebisu::Image.new(hit.dig('Image'))
  @ex_image = Ebisu::ExImage.new(hit.dig('ExImage'))
  @review = Ebisu::Review.new(hit.dig('Review'))
  @point = Ebisu::Point.new(hit.dig('Point'))
  @shipping = Ebisu::Shipping.new(hit.dig('Shipping'))
  @category = Ebisu::YCategory.new(hit.dig('Category'))
  @category_id_path = Ebisu::CategoryIdPath.new(hit.dig('CategoryIdPath'))
  @brands = Ebisu::Brands.new(hit.dig('Brands'))
  @store = Ebisu::Store.new(hit.dig('Store'))
end

Instance Attribute Details

#availabilityObject (readonly)

Returns the value of attribute availability.



21
22
23
# File 'lib/ebisu/models/item.rb', line 21

def availability
  @availability
end

#brandsObject

Returns the value of attribute brands.



89
90
91
# File 'lib/ebisu/models/item.rb', line 89

def brands
  @brands
end

#categoryObject

Returns the value of attribute category.



81
82
83
# File 'lib/ebisu/models/item.rb', line 81

def category
  @category
end

#category_id_pathObject

Returns the value of attribute category_id_path.



85
86
87
# File 'lib/ebisu/models/item.rb', line 85

def category_id_path
  @category_id_path
end

#codeObject

Returns the value of attribute code.



25
26
27
# File 'lib/ebisu/models/item.rb', line 25

def code
  @code
end

#descriptionObject

Returns the value of attribute description.



9
10
11
# File 'lib/ebisu/models/item.rb', line 9

def description
  @description
end

#ex_imageObject

Returns the value of attribute ex_image.



65
66
67
# File 'lib/ebisu/models/item.rb', line 65

def ex_image
  @ex_image
end

#headlineObject

Returns the value of attribute headline.



13
14
15
# File 'lib/ebisu/models/item.rb', line 13

def headline
  @headline
end

#imageObject

Returns the value of attribute image.



37
38
39
# File 'lib/ebisu/models/item.rb', line 37

def image
  @image
end

#isbn_codeObject

Returns the value of attribute isbn_code.



57
58
59
# File 'lib/ebisu/models/item.rb', line 57

def isbn_code
  @isbn_code
end

#jan_codeObject

Returns the value of attribute jan_code.



49
50
51
# File 'lib/ebisu/models/item.rb', line 49

def jan_code
  @jan_code
end

#modelObject

Returns the value of attribute model.



53
54
55
# File 'lib/ebisu/models/item.rb', line 53

def model
  @model
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#person_idObject

Returns the value of attribute person_id.



29
30
31
# File 'lib/ebisu/models/item.rb', line 29

def person_id
  @person_id
end

#pointObject

Returns the value of attribute point.



73
74
75
# File 'lib/ebisu/models/item.rb', line 73

def point
  @point
end

#priceObject

Returns the value of attribute price.



41
42
43
# File 'lib/ebisu/models/item.rb', line 41

def price
  @price
end

#price_labelObject

Returns the value of attribute price_label.



45
46
47
# File 'lib/ebisu/models/item.rb', line 45

def price_label
  @price_label
end

#product_idObject

Returns the value of attribute product_id.



33
34
35
# File 'lib/ebisu/models/item.rb', line 33

def product_id
  @product_id
end

#release_dateObject

Returns the value of attribute release_date.



61
62
63
# File 'lib/ebisu/models/item.rb', line 61

def release_date
  @release_date
end

#reviewObject

Returns the value of attribute review.



69
70
71
# File 'lib/ebisu/models/item.rb', line 69

def review
  @review
end

#shippingObject

Returns the value of attribute shipping.



77
78
79
# File 'lib/ebisu/models/item.rb', line 77

def shipping
  @shipping
end

#storeObject

Returns the value of attribute store.



93
94
95
# File 'lib/ebisu/models/item.rb', line 93

def store
  @store
end

#urlObject

Returns the value of attribute url.



17
18
19
# File 'lib/ebisu/models/item.rb', line 17

def url
  @url
end