Exception: Square::Connect::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/square/connect/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status, error) ⇒ Error

Returns a new instance of Error.



6
7
8
9
10
# File 'lib/square/connect/error.rb', line 6

def initialize(status, error)
  self.status = status
  self.type = error[:type]
  super error[:message]
end

Instance Attribute Details

#statusObject

Returns the value of attribute status.



4
5
6
# File 'lib/square/connect/error.rb', line 4

def status
  @status
end

#typeObject

Returns the value of attribute type.



4
5
6
# File 'lib/square/connect/error.rb', line 4

def type
  @type
end