Exception: Trustpilot::APIError
- Defined in:
- lib/trustpilot/errors.rb
Direct Known Subclasses
ClientError, OAuthTokenRequestError, RateLimitError, ServerError
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#http_status ⇒ Object
readonly
Returns the value of attribute http_status.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(http_status, body, message = nil) ⇒ APIError
constructor
A new instance of APIError.
Constructor Details
#initialize(http_status, body, message = nil) ⇒ APIError
Returns a new instance of APIError.
9 10 11 12 13 14 15 |
# File 'lib/trustpilot/errors.rb', line 9 def initialize http_status, body, = nil super() @http_status = http_status @body = body @message = end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
7 8 9 |
# File 'lib/trustpilot/errors.rb', line 7 def body @body end |
#http_status ⇒ Object (readonly)
Returns the value of attribute http_status.
7 8 9 |
# File 'lib/trustpilot/errors.rb', line 7 def http_status @http_status end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
7 8 9 |
# File 'lib/trustpilot/errors.rb', line 7 def @message end |