Class: Xolphin::Api::Responses::Base
- Inherits:
-
Object
- Object
- Xolphin::Api::Responses::Base
show all
- Defined in:
- lib/xolphin/api/responses/base.rb
Direct Known Subclasses
Certificate, Certificates, CsrData, Note, Notes, Product, ProductPrice, Products, Request, RequestEE, RequestValidation, RequestValidationDomain, Requests
Instance Method Summary
collapse
Constructor Details
#initialize(data) ⇒ Base
Returns a new instance of Base.
5
6
7
|
# File 'lib/xolphin/api/responses/base.rb', line 5
def initialize(data)
@data = data
end
|
Instance Method Details
#_embedded ⇒ Object
37
38
39
|
# File 'lib/xolphin/api/responses/base.rb', line 37
def _embedded
@data["_embedded"]
end
|
#error? ⇒ Boolean
9
10
11
|
# File 'lib/xolphin/api/responses/base.rb', line 9
def error?
errors || message
end
|
#errors ⇒ Object
13
14
15
|
# File 'lib/xolphin/api/responses/base.rb', line 13
def errors
@data["errors"]
end
|
#limit ⇒ Object
29
30
31
|
# File 'lib/xolphin/api/responses/base.rb', line 29
def limit
@data["limit"]
end
|
#message ⇒ Object
17
18
19
|
# File 'lib/xolphin/api/responses/base.rb', line 17
def message
@data["message"]
end
|
#page ⇒ Object
21
22
23
|
# File 'lib/xolphin/api/responses/base.rb', line 21
def page
@data["page"]
end
|
#pages ⇒ Object
25
26
27
|
# File 'lib/xolphin/api/responses/base.rb', line 25
def pages
@data["pages"]
end
|
#total ⇒ Object
33
34
35
|
# File 'lib/xolphin/api/responses/base.rb', line 33
def total
@data["total"]
end
|