Exception: Ticketutils::Error

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#codeObject

Returns the value of attribute code.



3
4
5
# File 'lib/ticketutils/error.rb', line 3

def code
  @code
end

#messageObject

Returns the value of attribute message.



3
4
5
# File 'lib/ticketutils/error.rb', line 3

def message
  @message
end

#statusObject

Returns the value of attribute status.



3
4
5
# File 'lib/ticketutils/error.rb', line 3

def status
  @status
end

Class Method Details

.parse(response) ⇒ Object



5
6
7
# File 'lib/ticketutils/error.rb', line 5

def self.parse(response)
  new(response["Status"], response["Errors"].first["ErrorCode"], response["Errors"].first["ErrorDescription"])
end