Exception: Shipay::ParamError

Inherits:
ShipayError show all
Defined in:
lib/shipay/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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



60
61
62
63
# File 'lib/shipay/errors.rb', line 60

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

Instance Attribute Details

#parameter_nameObject (readonly)

Returns the value of attribute parameter_name.



58
59
60
# File 'lib/shipay/errors.rb', line 58

def parameter_name
  @parameter_name
end

#typeObject (readonly)

Returns the value of attribute type.



58
59
60
# File 'lib/shipay/errors.rb', line 58

def type
  @type
end

#urlObject (readonly)

Returns the value of attribute url.



58
59
60
# File 'lib/shipay/errors.rb', line 58

def url
  @url
end

Instance Method Details

#to_hObject



65
66
67
# File 'lib/shipay/errors.rb', line 65

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