Class: Xolphin::Api::Responses::Product
- Inherits:
-
Base
- Object
- Base
- Xolphin::Api::Responses::Product
show all
- Defined in:
- lib/xolphin/api/responses/product.rb
Instance Method Summary
collapse
Methods inherited from Base
#_embedded, #error?, #errors, #limit, #message, #page, #pages, #total
Constructor Details
#initialize(data) ⇒ Product
Returns a new instance of Product.
5
6
7
|
# File 'lib/xolphin/api/responses/product.rb', line 5
def initialize(data)
super(data)
end
|
Instance Method Details
#brand ⇒ Object
27
28
29
|
# File 'lib/xolphin/api/responses/product.rb', line 27
def brand
@data["brand"]
end
|
#id ⇒ Object
23
24
25
|
# File 'lib/xolphin/api/responses/product.rb', line 23
def id
@data["id"]
end
|
#included_domains ⇒ Object
43
44
45
|
# File 'lib/xolphin/api/responses/product.rb', line 43
def included_domains
@data["includedDomains"]
end
|
#max_domains ⇒ Object
47
48
49
|
# File 'lib/xolphin/api/responses/product.rb', line 47
def max_domains
@data["maxDomains"]
end
|
#name ⇒ Object
31
32
33
|
# File 'lib/xolphin/api/responses/product.rb', line 31
def name
@data["name"]
end
|
#prices ⇒ Object
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/xolphin/api/responses/product.rb', line 9
def prices
@prices ||= begin
prices = []
if @data["prices"]
@data["prices"].each do |price|
prices << ProductPrice.new(price)
end
end
prices
end
end
|
#type ⇒ Object
35
36
37
|
# File 'lib/xolphin/api/responses/product.rb', line 35
def type
@data["type"]
end
|
#validation ⇒ Object
39
40
41
|
# File 'lib/xolphin/api/responses/product.rb', line 39
def validation
@data["validation"]
end
|