Class: Worldline::Acquiring::SDK::V1::Domain::ECommerceData
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Acquiring::SDK::V1::Domain::ECommerceData
- Defined in:
- lib/worldline/acquiring/sdk/v1/domain/e_commerce_data.rb
Instance Attribute Summary collapse
-
#address_verification_data ⇒ Worldline::Acquiring::SDK::V1::Domain::AddressVerificationData
The current value of address_verification_data.
-
#sca_exemption_request ⇒ String
The current value of sca_exemption_request.
-
#three_d_secure ⇒ Worldline::Acquiring::SDK::V1::Domain::ThreeDSecure
The current value of three_d_secure.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#address_verification_data ⇒ Worldline::Acquiring::SDK::V1::Domain::AddressVerificationData
Returns the current value of address_verification_data.
16 17 18 |
# File 'lib/worldline/acquiring/sdk/v1/domain/e_commerce_data.rb', line 16 def address_verification_data @address_verification_data end |
#sca_exemption_request ⇒ String
Returns the current value of sca_exemption_request.
16 17 18 |
# File 'lib/worldline/acquiring/sdk/v1/domain/e_commerce_data.rb', line 16 def sca_exemption_request @sca_exemption_request end |
#three_d_secure ⇒ Worldline::Acquiring::SDK::V1::Domain::ThreeDSecure
Returns the current value of three_d_secure.
16 17 18 |
# File 'lib/worldline/acquiring/sdk/v1/domain/e_commerce_data.rb', line 16 def three_d_secure @three_d_secure end |
Instance Method Details
#from_hash(hash) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/worldline/acquiring/sdk/v1/domain/e_commerce_data.rb', line 33 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? 'scaExemptionRequest' @sca_exemption_request = hash['scaExemptionRequest'] 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_h ⇒ Hash
25 26 27 28 29 30 31 |
# File 'lib/worldline/acquiring/sdk/v1/domain/e_commerce_data.rb', line 25 def to_h hash = super hash['addressVerificationData'] = @address_verification_data.to_h unless @address_verification_data.nil? hash['scaExemptionRequest'] = @sca_exemption_request unless @sca_exemption_request.nil? hash['threeDSecure'] = @three_d_secure.to_h unless @three_d_secure.nil? hash end |