Class: OnlinePayments::SDK::Domain::CardPaymentMethodSpecificInputForHostedCheckout
- Inherits:
-
DataObject
- Object
- 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.
-
#tokenization_mode ⇒ String
The current value of tokenization_mode.
Instance Method Summary collapse
Methods inherited from DataObject
Instance Attribute Details
#click_to_pay ⇒ true/false
Returns the current value of click_to_pay.
13 14 15 |
# File 'lib/onlinepayments/sdk/domain/card_payment_method_specific_input_for_hosted_checkout.rb', line 13 def click_to_pay @click_to_pay end |
#group_cards ⇒ true/false
Returns the current value of group_cards.
13 14 15 |
# File 'lib/onlinepayments/sdk/domain/card_payment_method_specific_input_for_hosted_checkout.rb', line 13 def group_cards @group_cards end |
#payment_product_preferred_order ⇒ Array<Integer>
Returns the current value of payment_product_preferred_order.
13 14 15 |
# File 'lib/onlinepayments/sdk/domain/card_payment_method_specific_input_for_hosted_checkout.rb', line 13 def payment_product_preferred_order @payment_product_preferred_order end |
#tokenization_mode ⇒ String
Returns the current value of tokenization_mode.
13 14 15 |
# File 'lib/onlinepayments/sdk/domain/card_payment_method_specific_input_for_hosted_checkout.rb', line 13 def tokenization_mode @tokenization_mode end |
Instance Method Details
#from_hash(hash) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/onlinepayments/sdk/domain/card_payment_method_specific_input_for_hosted_checkout.rb', line 33 def from_hash(hash) super if hash.has_key? 'clickToPay' @click_to_pay = hash['clickToPay'] end if hash.has_key? 'groupCards' @group_cards = hash['groupCards'] end if hash.has_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 if hash.has_key? 'tokenizationMode' @tokenization_mode = hash['tokenizationMode'] end end |
#to_h ⇒ Hash
24 25 26 27 28 29 30 31 |
# File 'lib/onlinepayments/sdk/domain/card_payment_method_specific_input_for_hosted_checkout.rb', line 24 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['tokenizationMode'] = @tokenization_mode unless @tokenization_mode.nil? hash end |