Exception: ExportoAPI::Error

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, response: nil, status_code: nil, request_id: nil, retry_after: nil) ⇒ Error

Returns a new instance of Error.



7
8
9
10
11
12
13
# File 'lib/exporto_api/errors.rb', line 7

def initialize(message = nil, response: nil, status_code: nil, request_id: nil, retry_after: nil)
  super(message)
  @response = response
  @status_code = status_code
  @request_id = request_id
  @retry_after = retry_after
end

Instance Attribute Details

#request_id ⇒ Object (readonly)

Returns the value of attribute request_id.



5
6
7
# File 'lib/exporto_api/errors.rb', line 5

def request_id
  @request_id
end

#response ⇒ Object (readonly)

Returns the value of attribute response.



5
6
7
# File 'lib/exporto_api/errors.rb', line 5

def response
  @response
end

#retry_after ⇒ Object (readonly)

Returns the value of attribute retry_after.



5
6
7
# File 'lib/exporto_api/errors.rb', line 5

def retry_after
  @retry_after
end

#status_code ⇒ Object (readonly)

Returns the value of attribute status_code.



5
6
7
# File 'lib/exporto_api/errors.rb', line 5

def status_code
  @status_code
end