Class: OnlinePayments::SDK::Domain::ShowFormData

Inherits:
OnlinePayments::SDK::DataObject show all
Defined in:
lib/onlinepayments/sdk/domain/show_form_data.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from OnlinePayments::SDK::DataObject

new_from_hash

Instance Attribute Details

#payment_product5404OnlinePayments::SDK::Domain::PaymentProduct5404

Returns the current value of payment_product5404.

Returns:



13
14
15
# File 'lib/onlinepayments/sdk/domain/show_form_data.rb', line 13

def payment_product5404
  @payment_product5404
end

#payment_product5407OnlinePayments::SDK::Domain::PaymentProduct5407

Returns the current value of payment_product5407.

Returns:



13
14
15
# File 'lib/onlinepayments/sdk/domain/show_form_data.rb', line 13

def payment_product5407
  @payment_product5407
end

Instance Method Details

#from_hash(hash) ⇒ Object



25
26
27
28
29
30
31
32
33
34
35
# File 'lib/onlinepayments/sdk/domain/show_form_data.rb', line 25

def from_hash(hash)
  super
  if hash.key? 'paymentProduct5404'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct5404']] unless hash['paymentProduct5404'].is_a? Hash
    @payment_product5404 = OnlinePayments::SDK::Domain::PaymentProduct5404.new_from_hash(hash['paymentProduct5404'])
  end
  if hash.key? 'paymentProduct5407'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct5407']] unless hash['paymentProduct5407'].is_a? Hash
    @payment_product5407 = OnlinePayments::SDK::Domain::PaymentProduct5407.new_from_hash(hash['paymentProduct5407'])
  end
end

#to_hHash

Returns:

  • (Hash)


18
19
20
21
22
23
# File 'lib/onlinepayments/sdk/domain/show_form_data.rb', line 18

def to_h
  hash = super
  hash['paymentProduct5404'] = @payment_product5404.to_h if @payment_product5404
  hash['paymentProduct5407'] = @payment_product5407.to_h if @payment_product5407
  hash
end