Class: Worldline::Connect::SDK::V1::Domain::CardPaymentMethodSpecificInputBase

Inherits:
AbstractCardPaymentMethodSpecificInput show all
Defined in:
lib/worldline/connect/sdk/v1/domain/card_payment_method_specific_input_base.rb

Instance Attribute Summary collapse

Attributes inherited from AbstractCardPaymentMethodSpecificInput

#acquirer_promotion_code, #authorization_mode, #customer_reference, #initial_scheme_transaction_id, #recurring, #recurring_payment_sequence_indicator, #requires_approval, #skip_authentication, #skip_fraud_service, #token, #tokenize, #transaction_channel, #unscheduled_card_on_file_indicator, #unscheduled_card_on_file_requestor, #unscheduled_card_on_file_sequence_indicator

Attributes inherited from AbstractPaymentMethodSpecificInput

#payment_product_id

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#three_d_secureWorldline::Connect::SDK::V1::Domain::ThreeDSecureBase

Returns the current value of three_d_secure.

Returns:



14
15
16
# File 'lib/worldline/connect/sdk/v1/domain/card_payment_method_specific_input_base.rb', line 14

def three_d_secure
  @three_d_secure
end

Instance Method Details

#from_hash(hash) ⇒ Object



25
26
27
28
29
30
31
# File 'lib/worldline/connect/sdk/v1/domain/card_payment_method_specific_input_base.rb', line 25

def from_hash(hash)
  super
  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::Connect::SDK::V1::Domain::ThreeDSecureBase.new_from_hash(hash['threeDSecure'])
  end
end

#to_hHash

Returns:

  • (Hash)


19
20
21
22
23
# File 'lib/worldline/connect/sdk/v1/domain/card_payment_method_specific_input_base.rb', line 19

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