Exception: Increase::HTTP::ResponseError

Inherits:
Error
  • Object
show all
Defined in:
lib/increase/base_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message:, response:, body:) ⇒ ResponseError

Returns a new instance of ResponseError.



276
277
278
279
280
281
# File 'lib/increase/base_client.rb', line 276

def initialize(message:, response:, body:)
  super(message)
  @response = response
  @body = body
  @code = response.code.to_i
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



274
275
276
# File 'lib/increase/base_client.rb', line 274

def body
  @body
end

#codeObject (readonly)

Returns the value of attribute code.



274
275
276
# File 'lib/increase/base_client.rb', line 274

def code
  @code
end

#responseObject (readonly)

Returns the value of attribute response.



274
275
276
# File 'lib/increase/base_client.rb', line 274

def response
  @response
end