Class: AdvancedBilling::APIException

Inherits:
CoreLibrary::ApiException
  • Object
show all
Defined in:
lib/advanced_billing/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.



16
17
18
19
# File 'lib/advanced_billing/exceptions/api_exception.rb', line 16

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.



10
11
12
13
# File 'lib/advanced_billing/exceptions/api_exception.rb', line 10

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