Class: InventoryManagementAndItemManagementAndOrderManagementAndPriceManagement::APIException

Inherits:
CoreLibrary::ApiException
  • Object
show all
Defined in:
lib/inventory_management_and_item_management_and_order_management_and_price_management/exceptions/api_exception.rb

Overview

Class for exceptions when there is a network error, status code error, etc.

Instance Method Summary collapse

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



17
18
19
20
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/exceptions/api_exception.rb', line 17

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} status_code: #{@response_code.inspect}, reason: #{@reason.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



11
12
13
14
# File 'lib/inventory_management_and_item_management_and_order_management_and_price_management/exceptions/api_exception.rb', line 11

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} status_code: #{@response_code}, reason: #{@reason}>"
end