Exception: Trustpilot::APIError

Inherits:
Error
  • Object
show all
Defined in:
lib/trustpilot/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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, message = nil
  super()

  @http_status = http_status
  @body = body
  @message = message
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



7
8
9
# File 'lib/trustpilot/errors.rb', line 7

def body
  @body
end

#http_statusObject (readonly)

Returns the value of attribute http_status.



7
8
9
# File 'lib/trustpilot/errors.rb', line 7

def http_status
  @http_status
end

#messageObject (readonly)

Returns the value of attribute message.



7
8
9
# File 'lib/trustpilot/errors.rb', line 7

def message
  @message
end