Class: OnlinePayments::SDK::Domain::CreditCardSpecificInputHostedTokenization
- Inherits:
-
OnlinePayments::SDK::DataObject
- Object
- OnlinePayments::SDK::DataObject
- OnlinePayments::SDK::Domain::CreditCardSpecificInputHostedTokenization
- Defined in:
- lib/onlinepayments/sdk/domain/credit_card_specific_input_hosted_tokenization.rb
Instance Attribute Summary collapse
-
#payment_product_preferred_order ⇒ Array<Integer>
The current value of payment_product_preferred_order.
-
#validation_rules ⇒ OnlinePayments::SDK::Domain::CreditCardValidationRulesHostedTokenization
The current value of validation_rules.
Instance Method Summary collapse
Methods inherited from OnlinePayments::SDK::DataObject
Instance Attribute Details
#payment_product_preferred_order ⇒ Array<Integer>
Returns the current value of payment_product_preferred_order.
12 13 14 |
# File 'lib/onlinepayments/sdk/domain/credit_card_specific_input_hosted_tokenization.rb', line 12 def payment_product_preferred_order @payment_product_preferred_order end |
#validation_rules ⇒ OnlinePayments::SDK::Domain::CreditCardValidationRulesHostedTokenization
Returns the current value of validation_rules.
12 13 14 |
# File 'lib/onlinepayments/sdk/domain/credit_card_specific_input_hosted_tokenization.rb', line 12 def validation_rules @validation_rules end |
Instance Method Details
#from_hash(hash) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/onlinepayments/sdk/domain/credit_card_specific_input_hosted_tokenization.rb', line 24 def from_hash(hash) super if hash.key? 'ValidationRules' raise TypeError, "value '%s' is not a Hash" % [hash['ValidationRules']] unless hash['ValidationRules'].is_a? Hash @validation_rules = OnlinePayments::SDK::Domain::CreditCardValidationRulesHostedTokenization.new_from_hash(hash['ValidationRules']) end 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
17 18 19 20 21 22 |
# File 'lib/onlinepayments/sdk/domain/credit_card_specific_input_hosted_tokenization.rb', line 17 def to_h hash = super hash['ValidationRules'] = @validation_rules.to_h if @validation_rules hash['paymentProductPreferredOrder'] = @payment_product_preferred_order unless @payment_product_preferred_order.nil? hash end |