Exception: Paysio::Errors::Base

Inherits:
Exception
  • Object
show all
Defined in:
lib/paysio/errors.rb

Instance Method Summary collapse

Instance Method Details

#attributesObject



5
6
7
# File 'lib/paysio/errors.rb', line 5

def attributes
  @attributes ||= Paysio::JSON.decode(exception_body)['error']
end

#exception_bodyObject



4
# File 'lib/paysio/errors.rb', line 4

alias_method :exception_body, :message

#messageObject



13
14
15
16
17
# File 'lib/paysio/errors.rb', line 13

def message
  attributes['message']
rescue
  exception_body
end

#paramsObject



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

def params
  attributes['params']
end

#typeObject



9
10
11
# File 'lib/paysio/errors.rb', line 9

def type
  attributes['type']
end