Exception: PagarMe::ParamError

Inherits:
PagarMeError show all
Defined in:
lib/pagarme/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, parameter_name, type, url) ⇒ ParamError

Returns a new instance of ParamError.



54
55
56
57
# File 'lib/pagarme/errors.rb', line 54

def initialize(message, parameter_name, type, url)
  @parameter_name, @type, @url = parameter_name, type, url
  super message
end

Instance Attribute Details

#parameter_nameObject (readonly)

Returns the value of attribute parameter_name.



52
53
54
# File 'lib/pagarme/errors.rb', line 52

def parameter_name
  @parameter_name
end

#typeObject (readonly)

Returns the value of attribute type.



52
53
54
# File 'lib/pagarme/errors.rb', line 52

def type
  @type
end

#urlObject (readonly)

Returns the value of attribute url.



52
53
54
# File 'lib/pagarme/errors.rb', line 52

def url
  @url
end

Instance Method Details

#to_hObject



59
60
61
# File 'lib/pagarme/errors.rb', line 59

def to_h
  { parameter_name: parameter_name , type: type , message: message }
end