Class: OnlinePayments::SDK::Domain::CardPaymentMethodSpecificInputForHostedCheckout
- Inherits:
-
OnlinePayments::SDK::DataObject
- Object
- OnlinePayments::SDK::DataObject
- OnlinePayments::SDK::Domain::CardPaymentMethodSpecificInputForHostedCheckout
- Defined in:
- lib/onlinepayments/sdk/domain/card_payment_method_specific_input_for_hosted_checkout.rb
Instance Attribute Summary collapse
-
#click_to_pay ⇒ true/false
The current value of click_to_pay.
-
#group_cards ⇒ true/false
The current value of group_cards.
-
#payment_product_preferred_order ⇒ Array<Integer>
The current value of payment_product_preferred_order.
Instance Method Summary collapse
Methods inherited from OnlinePayments::SDK::DataObject
Instance Attribute Details
#click_to_pay ⇒ true/false
Returns the current value of click_to_pay.
12 13 14 |
# File 'lib/onlinepayments/sdk/domain/card_payment_method_specific_input_for_hosted_checkout.rb', line 12 def click_to_pay @click_to_pay end |
#group_cards ⇒ true/false
Returns the current value of group_cards.
12 13 14 |
# File 'lib/onlinepayments/sdk/domain/card_payment_method_specific_input_for_hosted_checkout.rb', line 12 def group_cards @group_cards end |
#payment_product_preferred_order ⇒ Array<Integer>
Returns the current value of payment_product_preferred_order.
12 13 14 |
# File 'lib/onlinepayments/sdk/domain/card_payment_method_specific_input_for_hosted_checkout.rb', line 12 def payment_product_preferred_order @payment_product_preferred_order end |
Instance Method Details
#from_hash(hash) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/onlinepayments/sdk/domain/card_payment_method_specific_input_for_hosted_checkout.rb', line 26 def from_hash(hash) super @click_to_pay = hash['clickToPay'] if hash.key? 'clickToPay' @group_cards = hash['groupCards'] if hash.key? 'groupCards' if hash.key? 'paymentProductPreferredOrder' raise TypeError, "value '%s' is not an Array" % [hash['paymentProductPreferredOrder']] unless hash['paymentProductPreferredOrder'].is_a? Array @payment_product_preferred_order = [] hash['paymentProductPreferredOrder'].each do |e| @payment_product_preferred_order << e end end end |
#to_h ⇒ Hash
18 19 20 21 22 23 24 |
# File 'lib/onlinepayments/sdk/domain/card_payment_method_specific_input_for_hosted_checkout.rb', line 18 def to_h hash = super hash['clickToPay'] = @click_to_pay unless @click_to_pay.nil? hash['groupCards'] = @group_cards unless @group_cards.nil? hash['paymentProductPreferredOrder'] = @payment_product_preferred_order unless @payment_product_preferred_order.nil? hash end |