class Ingenico::Direct::SDK::Domain::ThreeDSecureBase

@attr [String] challenge_canvas_size @attr [String] challenge_indicator @attr [String] exemption_request @attr [Integer] merchant_fraud_rate @attr [Ingenico::Direct::SDK::Domain::ThreeDSecureData] prior_three_d_secure_data @attr [true/false] secure_corporate_payment @attr [true/false] skip_authentication @attr [true/false] skip_soft_decline

Attributes

challenge_canvas_size[RW]
challenge_indicator[RW]
exemption_request[RW]
merchant_fraud_rate[RW]
prior_three_d_secure_data[RW]
secure_corporate_payment[RW]
skip_authentication[RW]
skip_soft_decline[RW]

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/direct/sdk/domain/three_d_secure_base.rb, line 43
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'
  @merchant_fraud_rate = hash['merchantFraudRate'] if hash.key? 'merchantFraudRate'
  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
  @secure_corporate_payment = hash['secureCorporatePayment'] if hash.key? 'secureCorporatePayment'
  @skip_authentication = hash['skipAuthentication'] if hash.key? 'skipAuthentication'
  @skip_soft_decline = hash['skipSoftDecline'] if hash.key? 'skipSoftDecline'
end
to_h() click to toggle source

@return (Hash)

Calls superclass method Ingenico::Direct::SDK::DataObject#to_h
# File lib/ingenico/direct/sdk/domain/three_d_secure_base.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['merchantFraudRate'] = @merchant_fraud_rate unless @merchant_fraud_rate.nil?
  hash['priorThreeDSecureData'] = @prior_three_d_secure_data.to_h if @prior_three_d_secure_data
  hash['secureCorporatePayment'] = @secure_corporate_payment unless @secure_corporate_payment.nil?
  hash['skipAuthentication'] = @skip_authentication unless @skip_authentication.nil?
  hash['skipSoftDecline'] = @skip_soft_decline unless @skip_soft_decline.nil?
  hash
end