Class: Ingenico::Connect::SDK::Domain::Hostedcheckout::CreateHostedCheckoutResponse
- Inherits:
-
Ingenico::Connect::SDK::DataObject
- Object
- Ingenico::Connect::SDK::DataObject
- Ingenico::Connect::SDK::Domain::Hostedcheckout::CreateHostedCheckoutResponse
- Defined in:
- lib/ingenico/connect/sdk/domain/hostedcheckout/create_hosted_checkout_response.rb
Overview
Instance Attribute Summary collapse
-
#hosted_checkout_id ⇒ Object
String.
-
#invalid_tokens ⇒ Object
Array of String.
-
#partial_redirect_url ⇒ Object
String.
-
#returnmac ⇒ Object
String.
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#hosted_checkout_id ⇒ Object
String
18 19 20 |
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/create_hosted_checkout_response.rb', line 18 def hosted_checkout_id @hosted_checkout_id end |
#invalid_tokens ⇒ Object
Array of String
21 22 23 |
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/create_hosted_checkout_response.rb', line 21 def invalid_tokens @invalid_tokens end |
#partial_redirect_url ⇒ Object
String
24 25 26 |
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/create_hosted_checkout_response.rb', line 24 def partial_redirect_url @partial_redirect_url end |
#returnmac ⇒ Object
String
15 16 17 |
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/create_hosted_checkout_response.rb', line 15 def returnmac @returnmac end |
Instance Method Details
#from_hash(hash) ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/create_hosted_checkout_response.rb', line 35 def from_hash(hash) super if hash.has_key?('RETURNMAC') @returnmac = hash['RETURNMAC'] end if hash.has_key?('hostedCheckoutId') @hosted_checkout_id = hash['hostedCheckoutId'] end if hash.has_key?('invalidTokens') if !(hash['invalidTokens'].is_a? Array) raise TypeError, "value '%s' is not an Array" % [hash['invalidTokens']] end @invalid_tokens = [] hash['invalidTokens'].each do |e| @invalid_tokens << e end end if hash.has_key?('partialRedirectUrl') @partial_redirect_url = hash['partialRedirectUrl'] end end |
#to_h ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'lib/ingenico/connect/sdk/domain/hostedcheckout/create_hosted_checkout_response.rb', line 26 def to_h hash = super add_to_hash(hash, 'RETURNMAC', @returnmac) add_to_hash(hash, 'hostedCheckoutId', @hosted_checkout_id) add_to_hash(hash, 'invalidTokens', @invalid_tokens) add_to_hash(hash, 'partialRedirectUrl', @partial_redirect_url) hash end |