class Ingenico::Direct::SDK::Domain::GPayThreeDSecure

@attr [String] challenge_canvas_size @attr [String] challenge_indicator @attr [String] exemption_request @attr [Ingenico::Direct::SDK::Domain::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/direct/sdk/domain/g_pay_three_d_secure.rb, line 34
def from_hash(hash)
  super
  @challenge_canvas_size = hash['challengeCanvasSize'] if hash.key? 'challengeCanvasSize'
  @challenge_indicator = hash['challengeIndicator'] if hash.key? 'challengeIndicator'
  @exemption_request = hash['exemptionRequest'] if hash.key? 'exemptionRequest'
  if hash.key? 'redirectionData'
    raise TypeError, "value '%s' is not a Hash" % [hash['redirectionData']] unless hash['redirectionData'].is_a? Hash
    @redirection_data = Ingenico::Direct::SDK::Domain::RedirectionData.new_from_hash(hash['redirectionData'])
  end
  @skip_authentication = hash['skipAuthentication'] if hash.key? 'skipAuthentication'
end
to_h() click to toggle source

@return (Hash)

Calls superclass method Ingenico::Direct::SDK::DataObject#to_h
# File lib/ingenico/direct/sdk/domain/g_pay_three_d_secure.rb, line 24
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 if @redirection_data
  hash['skipAuthentication'] = @skip_authentication unless @skip_authentication.nil?
  hash
end