Class: Worldline::Connect::SDK::V1::Domain::EInvoicePaymentMethodSpecificInput

Inherits:
AbstractEInvoicePaymentMethodSpecificInput show all
Defined in:
lib/worldline/connect/sdk/v1/domain/e_invoice_payment_method_specific_input.rb

Instance Attribute Summary collapse

Attributes inherited from AbstractEInvoicePaymentMethodSpecificInput

#requires_approval

Attributes inherited from AbstractPaymentMethodSpecificInput

#payment_product_id

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#accepted_terms_and_conditionstrue/false

Returns the current value of accepted_terms_and_conditions.

Returns:

  • (true/false)

    the current value of accepted_terms_and_conditions



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

def accepted_terms_and_conditions
  @accepted_terms_and_conditions
end

#payment_product9000_specific_inputWorldline::Connect::SDK::V1::Domain::EInvoicePaymentProduct9000SpecificInput

Returns the current value of payment_product9000_specific_input.

Returns:



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

def payment_product9000_specific_input
  @payment_product9000_specific_input
end

Instance Method Details

#from_hash(hash) ⇒ Object



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

def from_hash(hash)
  super
  if hash.has_key? 'acceptedTermsAndConditions'
    @accepted_terms_and_conditions = hash['acceptedTermsAndConditions']
  end
  if hash.has_key? 'paymentProduct9000SpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct9000SpecificInput']] unless hash['paymentProduct9000SpecificInput'].is_a? Hash
    @payment_product9000_specific_input = Worldline::Connect::SDK::V1::Domain::EInvoicePaymentProduct9000SpecificInput.new_from_hash(hash['paymentProduct9000SpecificInput'])
  end
end

#to_hHash

Returns:

  • (Hash)


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

def to_h
  hash = super
  hash['acceptedTermsAndConditions'] = @accepted_terms_and_conditions unless @accepted_terms_and_conditions.nil?
  hash['paymentProduct9000SpecificInput'] = @payment_product9000_specific_input.to_h unless @payment_product9000_specific_input.nil?
  hash
end