Class: OnlinePayments::SDK::Domain::ShowFormData
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::Domain::ShowFormData
- Defined in:
- lib/onlinepayments/sdk/domain/show_form_data.rb
Instance Attribute Summary collapse
-
#payment_product3012 ⇒ OnlinePayments::SDK::Domain::PaymentProduct3012
The current value of payment_product3012.
-
#payment_product5001 ⇒ OnlinePayments::SDK::Domain::PaymentProduct5001
The current value of payment_product5001.
-
#payment_product5404 ⇒ OnlinePayments::SDK::Domain::PaymentProduct5404
The current value of payment_product5404.
-
#payment_product5407 ⇒ OnlinePayments::SDK::Domain::PaymentProduct5407
The current value of payment_product5407.
Instance Method Summary collapse
Methods inherited from DataObject
Instance Attribute Details
#payment_product3012 ⇒ OnlinePayments::SDK::Domain::PaymentProduct3012
Returns the current value of payment_product3012.
17 18 19 |
# File 'lib/onlinepayments/sdk/domain/show_form_data.rb', line 17 def payment_product3012 @payment_product3012 end |
#payment_product5001 ⇒ OnlinePayments::SDK::Domain::PaymentProduct5001
Returns the current value of payment_product5001.
17 18 19 |
# File 'lib/onlinepayments/sdk/domain/show_form_data.rb', line 17 def payment_product5001 @payment_product5001 end |
#payment_product5404 ⇒ OnlinePayments::SDK::Domain::PaymentProduct5404
Returns the current value of payment_product5404.
17 18 19 |
# File 'lib/onlinepayments/sdk/domain/show_form_data.rb', line 17 def payment_product5404 @payment_product5404 end |
#payment_product5407 ⇒ OnlinePayments::SDK::Domain::PaymentProduct5407
Returns the current value of payment_product5407.
17 18 19 |
# File 'lib/onlinepayments/sdk/domain/show_form_data.rb', line 17 def payment_product5407 @payment_product5407 end |
Instance Method Details
#from_hash(hash) ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/onlinepayments/sdk/domain/show_form_data.rb', line 37 def from_hash(hash) super if hash.has_key? 'paymentProduct3012' raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3012']] unless hash['paymentProduct3012'].is_a? Hash @payment_product3012 = OnlinePayments::SDK::Domain::PaymentProduct3012.new_from_hash(hash['paymentProduct3012']) end if hash.has_key? 'paymentProduct5001' raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct5001']] unless hash['paymentProduct5001'].is_a? Hash @payment_product5001 = OnlinePayments::SDK::Domain::PaymentProduct5001.new_from_hash(hash['paymentProduct5001']) end if hash.has_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.has_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_h ⇒ Hash
28 29 30 31 32 33 34 35 |
# File 'lib/onlinepayments/sdk/domain/show_form_data.rb', line 28 def to_h hash = super hash['paymentProduct3012'] = @payment_product3012.to_h unless @payment_product3012.nil? hash['paymentProduct5001'] = @payment_product5001.to_h unless @payment_product5001.nil? hash['paymentProduct5404'] = @payment_product5404.to_h unless @payment_product5404.nil? hash['paymentProduct5407'] = @payment_product5407.to_h unless @payment_product5407.nil? hash end |