Class: Worldline::Acquiring::SDK::V1::Domain::ECommerceDataForAccountVerification

Inherits:
Domain::DataObject
  • Object
show all
Defined in:
lib/worldline/acquiring/sdk/v1/domain/e_commerce_data_for_account_verification.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#address_verification_dataWorldline::Acquiring::SDK::V1::Domain::AddressVerificationData

Returns the current value of address_verification_data.

Returns:



15
16
17
# File 'lib/worldline/acquiring/sdk/v1/domain/e_commerce_data_for_account_verification.rb', line 15

def address_verification_data
  @address_verification_data
end

#three_d_secureWorldline::Acquiring::SDK::V1::Domain::ThreeDSecure

Returns the current value of three_d_secure.

Returns:



15
16
17
# File 'lib/worldline/acquiring/sdk/v1/domain/e_commerce_data_for_account_verification.rb', line 15

def three_d_secure
  @three_d_secure
end

Instance Method Details

#from_hash(hash) ⇒ Object



29
30
31
32
33
34
35
36
37
38
39
# File 'lib/worldline/acquiring/sdk/v1/domain/e_commerce_data_for_account_verification.rb', line 29

def from_hash(hash)
  super
  if hash.has_key? 'addressVerificationData'
    raise TypeError, "value '%s' is not a Hash" % [hash['addressVerificationData']] unless hash['addressVerificationData'].is_a? Hash
    @address_verification_data = Worldline::Acquiring::SDK::V1::Domain::AddressVerificationData.new_from_hash(hash['addressVerificationData'])
  end
  if hash.has_key? 'threeDSecure'
    raise TypeError, "value '%s' is not a Hash" % [hash['threeDSecure']] unless hash['threeDSecure'].is_a? Hash
    @three_d_secure = Worldline::Acquiring::SDK::V1::Domain::ThreeDSecure.new_from_hash(hash['threeDSecure'])
  end
end

#to_hHash

Returns:

  • (Hash)


22
23
24
25
26
27
# File 'lib/worldline/acquiring/sdk/v1/domain/e_commerce_data_for_account_verification.rb', line 22

def to_h
  hash = super
  hash['addressVerificationData'] = @address_verification_data.to_h unless @address_verification_data.nil?
  hash['threeDSecure'] = @three_d_secure.to_h unless @three_d_secure.nil?
  hash
end