Exception: Google4R::Checkout::GoogleCheckoutError

Inherits:
Exception
  • Object
show all
Defined in:
lib/google4r/checkout/shared.rb

Overview

This exception is thrown by Command#send_to_google_checkout when an error occured.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ GoogleCheckoutError

The parameter is a hash with the entries :serial_number, :message and :response_code. The attributes serial_number, message and response_code are set to the values in the Hash.



50
51
52
53
54
# File 'lib/google4r/checkout/shared.rb', line 50

def initialize(hash)
  @response_code = hash[:response_code]
  @message = hash[:message]
  @serial_number = hash[:serial_number]
end

Instance Attribute Details

#response_codeObject (readonly)

The HTTP response code of Google’s response.



45
46
47
# File 'lib/google4r/checkout/shared.rb', line 45

def response_code
  @response_code
end

#serial_numberObject (readonly)

The serial number of the error returned by Google.



42
43
44
# File 'lib/google4r/checkout/shared.rb', line 42

def serial_number
  @serial_number
end