Class: Worldline::Connect::SDK::V1::Domain::SepaDirectDebitPaymentMethodSpecificOutput

Inherits:
AbstractPaymentMethodSpecificOutput show all
Defined in:
lib/worldline/connect/sdk/v1/domain/sepa_direct_debit_payment_method_specific_output.rb

Instance Attribute Summary collapse

Attributes inherited from AbstractPaymentMethodSpecificOutput

#payment_product_id

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#fraud_resultsWorldline::Connect::SDK::V1::Domain::FraudResults

Returns the current value of fraud_results.

Returns:



17
18
19
# File 'lib/worldline/connect/sdk/v1/domain/sepa_direct_debit_payment_method_specific_output.rb', line 17

def fraud_results
  @fraud_results
end

#payment_product771_specific_outputWorldline::Connect::SDK::V1::Domain::PaymentProduct771SpecificOutput

Returns the current value of payment_product771_specific_output.

Returns:



17
18
19
# File 'lib/worldline/connect/sdk/v1/domain/sepa_direct_debit_payment_method_specific_output.rb', line 17

def payment_product771_specific_output
  @payment_product771_specific_output
end

#tokenString

Returns the current value of token.

Returns:

  • (String)

    the current value of token



17
18
19
# File 'lib/worldline/connect/sdk/v1/domain/sepa_direct_debit_payment_method_specific_output.rb', line 17

def token
  @token
end

Instance Method Details

#from_hash(hash) ⇒ Object



34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/worldline/connect/sdk/v1/domain/sepa_direct_debit_payment_method_specific_output.rb', line 34

def from_hash(hash)
  super
  if hash.has_key? 'fraudResults'
    raise TypeError, "value '%s' is not a Hash" % [hash['fraudResults']] unless hash['fraudResults'].is_a? Hash
    @fraud_results = Worldline::Connect::SDK::V1::Domain::FraudResults.new_from_hash(hash['fraudResults'])
  end
  if hash.has_key? 'paymentProduct771SpecificOutput'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct771SpecificOutput']] unless hash['paymentProduct771SpecificOutput'].is_a? Hash
    @payment_product771_specific_output = Worldline::Connect::SDK::V1::Domain::PaymentProduct771SpecificOutput.new_from_hash(hash['paymentProduct771SpecificOutput'])
  end
  if hash.has_key? 'token'
    @token = hash['token']
  end
end

#to_hHash

Returns:

  • (Hash)


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

def to_h
  hash = super
  hash['fraudResults'] = @fraud_results.to_h unless @fraud_results.nil?
  hash['paymentProduct771SpecificOutput'] = @payment_product771_specific_output.to_h unless @payment_product771_specific_output.nil?
  hash['token'] = @token unless @token.nil?
  hash
end