class Ingenico::Connect::SDK::Domain::Payment::GPayThreeDSecure

@attr [String] challenge_canvas_size @attr [String] challenge_indicator @attr [String] exemption_request @attr [Ingenico::Connect::SDK::Domain::Payment::RedirectionData] redirection_data @attr [true/false] skip_authentication

Attributes

challenge_canvas_size[RW]
challenge_indicator[RW]
exemption_request[RW]
redirection_data[RW]
skip_authentication[RW]

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/connect/sdk/domain/payment/g_pay_three_d_secure.rb, line 40
def from_hash(hash)
  super
  if hash.has_key? 'challengeCanvasSize'
    @challenge_canvas_size = hash['challengeCanvasSize']
  end
  if hash.has_key? 'challengeIndicator'
    @challenge_indicator = hash['challengeIndicator']
  end
  if hash.has_key? 'exemptionRequest'
    @exemption_request = hash['exemptionRequest']
  end
  if hash.has_key? 'redirectionData'
    raise TypeError, "value '%s' is not a Hash" % [hash['redirectionData']] unless hash['redirectionData'].is_a? Hash
    @redirection_data = Ingenico::Connect::SDK::Domain::Payment::RedirectionData.new_from_hash(hash['redirectionData'])
  end
  if hash.has_key? 'skipAuthentication'
    @skip_authentication = hash['skipAuthentication']
  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/payment/g_pay_three_d_secure.rb, line 30
def to_h
  hash = super
  hash['challengeCanvasSize'] = @challenge_canvas_size unless @challenge_canvas_size.nil?
  hash['challengeIndicator'] = @challenge_indicator unless @challenge_indicator.nil?
  hash['exemptionRequest'] = @exemption_request unless @exemption_request.nil?
  hash['redirectionData'] = @redirection_data.to_h unless @redirection_data.nil?
  hash['skipAuthentication'] = @skip_authentication unless @skip_authentication.nil?
  hash
end