Class: Ingenico::Direct::SDK::Domain::ThreeDSecureBase

Inherits:
Ingenico::Direct::SDK::DataObject show all
Defined in:
lib/ingenico/direct/sdk/domain/three_d_secure_base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Ingenico::Direct::SDK::DataObject

new_from_hash

Instance Attribute Details

#challenge_canvas_sizeString

Returns the current value of challenge_canvas_size.

Returns:

  • (String)

    the current value of challenge_canvas_size



16
17
18
# File 'lib/ingenico/direct/sdk/domain/three_d_secure_base.rb', line 16

def challenge_canvas_size
  @challenge_canvas_size
end

#challenge_indicatorString

Returns the current value of challenge_indicator.

Returns:

  • (String)

    the current value of challenge_indicator



16
17
18
# File 'lib/ingenico/direct/sdk/domain/three_d_secure_base.rb', line 16

def challenge_indicator
  @challenge_indicator
end

#exemption_requestString

Returns the current value of exemption_request.

Returns:

  • (String)

    the current value of exemption_request



16
17
18
# File 'lib/ingenico/direct/sdk/domain/three_d_secure_base.rb', line 16

def exemption_request
  @exemption_request
end

#prior_three_d_secure_dataIngenico::Direct::SDK::Domain::ThreeDSecureData

Returns the current value of prior_three_d_secure_data.

Returns:



16
17
18
# File 'lib/ingenico/direct/sdk/domain/three_d_secure_base.rb', line 16

def prior_three_d_secure_data
  @prior_three_d_secure_data
end

#skip_authenticationtrue/false

Returns the current value of skip_authentication.

Returns:

  • (true/false)

    the current value of skip_authentication



16
17
18
# File 'lib/ingenico/direct/sdk/domain/three_d_secure_base.rb', line 16

def skip_authentication
  @skip_authentication
end

Instance Method Details

#from_hash(hash) ⇒ Object



34
35
36
37
38
39
40
41
42
43
44
# File 'lib/ingenico/direct/sdk/domain/three_d_secure_base.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? 'priorThreeDSecureData'
    raise TypeError, "value '%s' is not a Hash" % [hash['priorThreeDSecureData']] unless hash['priorThreeDSecureData'].is_a? Hash
    @prior_three_d_secure_data = Ingenico::Direct::SDK::Domain::ThreeDSecureData.new_from_hash(hash['priorThreeDSecureData'])
  end
  @skip_authentication = hash['skipAuthentication'] if hash.key? 'skipAuthentication'
end

#to_hHash

Returns:

  • (Hash)


24
25
26
27
28
29
30
31
32
# File 'lib/ingenico/direct/sdk/domain/three_d_secure_base.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['priorThreeDSecureData'] = @prior_three_d_secure_data.to_h if @prior_three_d_secure_data
  hash['skipAuthentication'] = @skip_authentication unless @skip_authentication.nil?
  hash
end