Class: Worldline::Connect::SDK::V1::Domain::EInvoicePaymentMethodSpecificOutput

Inherits:
AbstractPaymentMethodSpecificOutput show all
Defined in:
lib/worldline/connect/sdk/v1/domain/e_invoice_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:



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

def fraud_results
  @fraud_results
end

#payment_product9000_specific_outputWorldline::Connect::SDK::V1::Domain::EInvoicePaymentProduct9000SpecificOutput

Returns the current value of payment_product9000_specific_output.

Returns:



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

def payment_product9000_specific_output
  @payment_product9000_specific_output
end

Instance Method Details

#from_hash(hash) ⇒ Object



30
31
32
33
34
35
36
37
38
39
40
# File 'lib/worldline/connect/sdk/v1/domain/e_invoice_payment_method_specific_output.rb', line 30

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? 'paymentProduct9000SpecificOutput'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct9000SpecificOutput']] unless hash['paymentProduct9000SpecificOutput'].is_a? Hash
    @payment_product9000_specific_output = Worldline::Connect::SDK::V1::Domain::EInvoicePaymentProduct9000SpecificOutput.new_from_hash(hash['paymentProduct9000SpecificOutput'])
  end
end

#to_hHash

Returns:

  • (Hash)


23
24
25
26
27
28
# File 'lib/worldline/connect/sdk/v1/domain/e_invoice_payment_method_specific_output.rb', line 23

def to_h
  hash = super
  hash['fraudResults'] = @fraud_results.to_h unless @fraud_results.nil?
  hash['paymentProduct9000SpecificOutput'] = @payment_product9000_specific_output.to_h unless @payment_product9000_specific_output.nil?
  hash
end