Class: Batches::BatchesTransactions504ErrorException
- Inherits:
-
APIException
- Object
- CoreLibrary::ApiException
- APIException
- Batches::BatchesTransactions504ErrorException
- Defined in:
- lib/batches/exceptions/batches_transactions504_error_exception.rb
Overview
Timeout
Instance Attribute Summary collapse
-
#detailed_error_code ⇒ DetailedErrorCode6
Unique reference to identify the error.
-
#detailed_error_description ⇒ String
No response from payment method provider.
-
#error_code ⇒ ErrorCode6
This is an error indicating there was a timeout issue to another system.
Instance Method Summary collapse
-
#initialize(reason, response) ⇒ BatchesTransactions504ErrorException
constructor
The constructor.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
-
#unbox(hash) ⇒ Object
Populates this object by extracting properties from a hash.
Constructor Details
#initialize(reason, response) ⇒ BatchesTransactions504ErrorException
The constructor.
27 28 29 30 31 |
# File 'lib/batches/exceptions/batches_transactions504_error_exception.rb', line 27 def initialize(reason, response) super(reason, response) hash = APIHelper.json_deserialize(@response.raw_body) unbox(hash) end |
Instance Attribute Details
#detailed_error_code ⇒ DetailedErrorCode6
Unique reference to identify the error.
18 19 20 |
# File 'lib/batches/exceptions/batches_transactions504_error_exception.rb', line 18 def detailed_error_code @detailed_error_code end |
#detailed_error_description ⇒ String
No response from payment method provider.
22 23 24 |
# File 'lib/batches/exceptions/batches_transactions504_error_exception.rb', line 22 def detailed_error_description @detailed_error_description end |
#error_code ⇒ ErrorCode6
This is an error indicating there was a timeout issue to another system.
14 15 16 |
# File 'lib/batches/exceptions/batches_transactions504_error_exception.rb', line 14 def error_code @error_code end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
54 55 56 57 58 59 |
# File 'lib/batches/exceptions/batches_transactions504_error_exception.rb', line 54 def inspect class_name = self.class.name.split('::').last "<#{class_name} error_code: #{@error_code.inspect}, detailed_error_code:"\ " #{@detailed_error_code.inspect}, detailed_error_description:"\ " #{@detailed_error_description.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
47 48 49 50 51 |
# File 'lib/batches/exceptions/batches_transactions504_error_exception.rb', line 47 def to_s class_name = self.class.name.split('::').last "<#{class_name} error_code: #{@error_code}, detailed_error_code: #{@detailed_error_code},"\ " detailed_error_description: #{@detailed_error_description}>" end |
#unbox(hash) ⇒ Object
Populates this object by extracting properties from a hash. response body.
36 37 38 39 40 41 42 43 44 |
# File 'lib/batches/exceptions/batches_transactions504_error_exception.rb', line 36 def unbox(hash) return nil unless hash @error_code = hash.key?('error_code') ? hash['error_code'] : SKIP @detailed_error_code = hash.key?('detailed_error_code') ? hash['detailed_error_code'] : SKIP @detailed_error_description = hash.key?('detailed_error_description') ? hash['detailed_error_description'] : SKIP end |