Class: Worldline::Connect::SDK::V1::Domain::MandateNonSepaDirectDebit

Inherits:
Domain::DataObject
  • Object
show all
Defined in:
lib/worldline/connect/sdk/v1/domain/mandate_non_sepa_direct_debit.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#payment_product705_specific_dataWorldline::Connect::SDK::V1::Domain::TokenNonSepaDirectDebitPaymentProduct705SpecificData

Returns the current value of payment_product705_specific_data.

Returns:



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

def payment_product705_specific_data
  @payment_product705_specific_data
end

#payment_product730_specific_dataWorldline::Connect::SDK::V1::Domain::TokenNonSepaDirectDebitPaymentProduct730SpecificData

Returns the current value of payment_product730_specific_data.

Returns:



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

def payment_product730_specific_data
  @payment_product730_specific_data
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/mandate_non_sepa_direct_debit.rb', line 30

def from_hash(hash)
  super
  if hash.has_key? 'paymentProduct705SpecificData'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct705SpecificData']] unless hash['paymentProduct705SpecificData'].is_a? Hash
    @payment_product705_specific_data = Worldline::Connect::SDK::V1::Domain::TokenNonSepaDirectDebitPaymentProduct705SpecificData.new_from_hash(hash['paymentProduct705SpecificData'])
  end
  if hash.has_key? 'paymentProduct730SpecificData'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct730SpecificData']] unless hash['paymentProduct730SpecificData'].is_a? Hash
    @payment_product730_specific_data = Worldline::Connect::SDK::V1::Domain::TokenNonSepaDirectDebitPaymentProduct730SpecificData.new_from_hash(hash['paymentProduct730SpecificData'])
  end
end

#to_hHash

Returns:

  • (Hash)


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

def to_h
  hash = super
  hash['paymentProduct705SpecificData'] = @payment_product705_specific_data.to_h unless @payment_product705_specific_data.nil?
  hash['paymentProduct730SpecificData'] = @payment_product730_specific_data.to_h unless @payment_product730_specific_data.nil?
  hash
end