Class: Recharge::RequestError

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

Overview

Raised when a non-2XX HTTP response is returned

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, status, meta = nil, errors = nil) ⇒ RequestError

Returns a new instance of RequestError.



21
22
23
24
25
26
# File 'lib/recharge.rb', line 21

def initialize(message, status, meta = nil, errors = nil)
  super message
  @status = status
  @meta = meta || {}
  @errors = errors || {}
end

Instance Attribute Details

#errorsObject

Returns the value of attribute errors.



17
18
19
# File 'lib/recharge.rb', line 17

def errors
  @errors
end

#metaObject

Returns the value of attribute meta.



19
20
21
# File 'lib/recharge.rb', line 19

def meta
  @meta
end

#statusObject

Returns the value of attribute status.



18
19
20
# File 'lib/recharge.rb', line 18

def status
  @status
end