Exception: CheckoutSdk::CheckoutApiException

Inherits:
CheckoutException show all
Defined in:
lib/checkout_sdk/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response, message = nil) ⇒ CheckoutApiException

Returns a new instance of CheckoutApiException.



21
22
23
24
25
# File 'lib/checkout_sdk/error.rb', line 21

def initialize(response, message = nil)
  @http_metadata = CheckoutUtils.(response)
  @error_details = parse_error_details(.body)
  super(message || build_error_message)
end

Instance Attribute Details

#error_detailsObject (readonly)

Returns the value of attribute error_details.



19
20
21
# File 'lib/checkout_sdk/error.rb', line 19

def error_details
  @error_details
end

#http_metadataObject (readonly)

Returns the value of attribute http_metadata.



19
20
21
# File 'lib/checkout_sdk/error.rb', line 19

def 
  @http_metadata
end