Exception: Yadirect::ApiError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/api_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ ApiError

Returns a new instance of ApiError.



5
6
7
8
9
# File 'lib/api_error.rb', line 5

def initialize(hash)
  @error_detail = hash["error_detail"]
  @error_str = hash["error_str"]
  @error_code = hash["error_code"]
end

Instance Attribute Details

#error_codeObject (readonly)

Returns the value of attribute error_code.



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

def error_code
  @error_code
end

#error_detailObject (readonly)

Returns the value of attribute error_detail.



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

def error_detail
  @error_detail
end

#error_strObject (readonly)

Returns the value of attribute error_str.



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

def error_str
  @error_str
end

Instance Method Details

#to_sObject



11
12
13
# File 'lib/api_error.rb', line 11

def to_s
  "@error_detail=\"#{@error_detail}\", @error_str=\"#{@error_str}\", @error_code=\"#{@error_code}\""
end