Exception: Lazada::APIError

Inherits:
LazadaError show all
Defined in:
lib/lazada_dino/exceptions/lazada.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LazadaError

#detailed_description

Constructor Details

#initialize(message = nil, params = {}) ⇒ APIError

Returns a new instance of APIError.



28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/lazada_dino/exceptions/lazada.rb', line 28

def initialize(message = nil, params = {})
  super message

  @http_code           = params[:http_code]
  @response            = params[:response]

  @error_type          = params[:error_type]
  @error_code          = params[:error_code]
  @error_message       = params[:error_message]
  @error_detail        = params[:error_detail]
  @request_http_method = params[:request_http_method]
  @request_uri         = params[:request_uri]
end

Instance Attribute Details

#error_codeObject (readonly)

Returns the value of attribute error_code.



24
25
26
# File 'lib/lazada_dino/exceptions/lazada.rb', line 24

def error_code
  @error_code
end

#error_detailObject (readonly)

Returns the value of attribute error_detail.



26
27
28
# File 'lib/lazada_dino/exceptions/lazada.rb', line 26

def error_detail
  @error_detail
end

#error_messageObject (readonly)

Returns the value of attribute error_message.



25
26
27
# File 'lib/lazada_dino/exceptions/lazada.rb', line 25

def error_message
  @error_message
end

#error_typeObject (readonly)

Returns the value of attribute error_type.



23
24
25
# File 'lib/lazada_dino/exceptions/lazada.rb', line 23

def error_type
  @error_type
end

#http_codeObject (readonly)

Returns the value of attribute http_code.



20
21
22
# File 'lib/lazada_dino/exceptions/lazada.rb', line 20

def http_code
  @http_code
end

#responseObject (readonly)

Returns the value of attribute response.



21
22
23
# File 'lib/lazada_dino/exceptions/lazada.rb', line 21

def response
  @response
end