Exception: Robomart::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/robomart.rb

Overview

API error carrying the HTTP status and the error envelope.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, status: nil, type: nil, code: nil) ⇒ Error

Returns a new instance of Error.



23
24
25
26
27
28
# File 'lib/robomart.rb', line 23

def initialize(message, status: nil, type: nil, code: nil)
  super(message)
  @status = status
  @type = type
  @code = code
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



21
22
23
# File 'lib/robomart.rb', line 21

def code
  @code
end

#statusObject (readonly)

Returns the value of attribute status.



21
22
23
# File 'lib/robomart.rb', line 21

def status
  @status
end

#typeObject (readonly)

Returns the value of attribute type.



21
22
23
# File 'lib/robomart.rb', line 21

def type
  @type
end