Class: Ingenico::Connect::SDK::Domain::Payment::AbstractThreeDSecure

Inherits:
Ingenico::Connect::SDK::DataObject show all
Defined in:
lib/ingenico/connect/sdk/domain/payment/abstract_three_d_secure.rb

Direct Known Subclasses

ThreeDSecure, ThreeDSecureBase

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Ingenico::Connect::SDK::DataObject

new_from_hash

Instance Attribute Details

#authentication_flowString

Returns the current value of authentication_flow.

Returns:

  • (String)

    the current value of authentication_flow



20
21
22
# File 'lib/ingenico/connect/sdk/domain/payment/abstract_three_d_secure.rb', line 20

def authentication_flow
  @authentication_flow
end

#challenge_canvas_sizeString

Returns the current value of challenge_canvas_size.

Returns:

  • (String)

    the current value of challenge_canvas_size



20
21
22
# File 'lib/ingenico/connect/sdk/domain/payment/abstract_three_d_secure.rb', line 20

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



20
21
22
# File 'lib/ingenico/connect/sdk/domain/payment/abstract_three_d_secure.rb', line 20

def challenge_indicator
  @challenge_indicator
end

#exemption_requestString

Returns the current value of exemption_request.

Returns:

  • (String)

    the current value of exemption_request



20
21
22
# File 'lib/ingenico/connect/sdk/domain/payment/abstract_three_d_secure.rb', line 20

def exemption_request
  @exemption_request
end

#prior_three_d_secure_dataIngenico::Connect::SDK::Domain::Payment::ThreeDSecureData

Returns the current value of prior_three_d_secure_data.

Returns:



20
21
22
# File 'lib/ingenico/connect/sdk/domain/payment/abstract_three_d_secure.rb', line 20

def prior_three_d_secure_data
  @prior_three_d_secure_data
end

#sdk_dataIngenico::Connect::SDK::Domain::Payment::SdkDataInput

Returns the current value of sdk_data.

Returns:



20
21
22
# File 'lib/ingenico/connect/sdk/domain/payment/abstract_three_d_secure.rb', line 20

def sdk_data
  @sdk_data
end

#skip_authenticationtrue/false

Returns the current value of skip_authentication.

Returns:

  • (true/false)

    the current value of skip_authentication



20
21
22
# File 'lib/ingenico/connect/sdk/domain/payment/abstract_three_d_secure.rb', line 20

def skip_authentication
  @skip_authentication
end

Instance Method Details

#from_hash(hash) ⇒ Object



49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/ingenico/connect/sdk/domain/payment/abstract_three_d_secure.rb', line 49

def from_hash(hash)
  super
  if hash.has_key? 'authenticationFlow'
    @authentication_flow = hash['authenticationFlow']
  end
  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? 'priorThreeDSecureData'
    raise TypeError, "value '%s' is not a Hash" % [hash['priorThreeDSecureData']] unless hash['priorThreeDSecureData'].is_a? Hash
    @prior_three_d_secure_data = Ingenico::Connect::SDK::Domain::Payment::ThreeDSecureData.new_from_hash(hash['priorThreeDSecureData'])
  end
  if hash.has_key? 'sdkData'
    raise TypeError, "value '%s' is not a Hash" % [hash['sdkData']] unless hash['sdkData'].is_a? Hash
    @sdk_data = Ingenico::Connect::SDK::Domain::Payment::SdkDataInput.new_from_hash(hash['sdkData'])
  end
  if hash.has_key? 'skipAuthentication'
    @skip_authentication = hash['skipAuthentication']
  end
end

#to_hHash

Returns:

  • (Hash)


37
38
39
40
41
42
43
44
45
46
47
# File 'lib/ingenico/connect/sdk/domain/payment/abstract_three_d_secure.rb', line 37

def to_h
  hash = super
  hash['authenticationFlow'] = @authentication_flow unless @authentication_flow.nil?
  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 unless @prior_three_d_secure_data.nil?
  hash['sdkData'] = @sdk_data.to_h unless @sdk_data.nil?
  hash['skipAuthentication'] = @skip_authentication unless @skip_authentication.nil?
  hash
end