class Ingenico::Connect::SDK::Domain::Hostedcheckout::CreateHostedCheckoutResponse
@attr [String] returnmac @attr [String] hosted_checkout_id
@attr [Array<String>] invalid_tokens
@attr [String] merchant_reference
@attr [String] partial_redirect_url
Attributes
hosted_checkout_id[RW]
invalid_tokens[RW]
merchant_reference[RW]
partial_redirect_url[RW]
returnmac[RW]
Public Instance Methods
from_hash(hash)
click to toggle source
Calls superclass method
Ingenico::Connect::SDK::DataObject#from_hash
# File lib/ingenico/connect/sdk/domain/hostedcheckout/create_hosted_checkout_response.rb, line 39 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' raise TypeError, "value '%s' is not an Array" % [hash['invalidTokens']] unless hash['invalidTokens'].is_a? Array @invalid_tokens = [] hash['invalidTokens'].each do |e| @invalid_tokens << e end end if hash.has_key? 'merchantReference' @merchant_reference = hash['merchantReference'] end if hash.has_key? 'partialRedirectUrl' @partial_redirect_url = hash['partialRedirectUrl'] end end
to_h()
click to toggle source
@return (Hash)
Calls superclass method
Ingenico::Connect::SDK::DataObject#to_h
# File lib/ingenico/connect/sdk/domain/hostedcheckout/create_hosted_checkout_response.rb, line 29 def to_h hash = super hash['RETURNMAC'] = @returnmac unless @returnmac.nil? hash['hostedCheckoutId'] = @hosted_checkout_id unless @hosted_checkout_id.nil? hash['invalidTokens'] = @invalid_tokens unless @invalid_tokens.nil? hash['merchantReference'] = @merchant_reference unless @merchant_reference.nil? hash['partialRedirectUrl'] = @partial_redirect_url unless @partial_redirect_url.nil? hash end