Class: OnlinePayments::SDK::Domain::CreateHostedTokenizationRequest
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::Domain::CreateHostedTokenizationRequest
- Defined in:
- lib/onlinepayments/sdk/domain/create_hosted_tokenization_request.rb
Instance Attribute Summary collapse
-
#ask_consumer_consent ⇒ true/false
The current value of ask_consumer_consent.
-
#credit_card_specific_input ⇒ OnlinePayments::SDK::Domain::CreditCardSpecificInputHostedTokenization
The current value of credit_card_specific_input.
-
#locale ⇒ String
The current value of locale.
-
#payment_product_filters ⇒ OnlinePayments::SDK::Domain::PaymentProductFiltersHostedTokenization
The current value of payment_product_filters.
-
#tokens ⇒ String
The current value of tokens.
-
#variant ⇒ String
The current value of variant.
Instance Method Summary collapse
Methods inherited from DataObject
Instance Attribute Details
#ask_consumer_consent ⇒ true/false
Returns the current value of ask_consumer_consent.
17 18 19 |
# File 'lib/onlinepayments/sdk/domain/create_hosted_tokenization_request.rb', line 17 def @ask_consumer_consent end |
#credit_card_specific_input ⇒ OnlinePayments::SDK::Domain::CreditCardSpecificInputHostedTokenization
Returns the current value of credit_card_specific_input.
17 18 19 |
# File 'lib/onlinepayments/sdk/domain/create_hosted_tokenization_request.rb', line 17 def credit_card_specific_input @credit_card_specific_input end |
#locale ⇒ String
Returns the current value of locale.
17 18 19 |
# File 'lib/onlinepayments/sdk/domain/create_hosted_tokenization_request.rb', line 17 def locale @locale end |
#payment_product_filters ⇒ OnlinePayments::SDK::Domain::PaymentProductFiltersHostedTokenization
Returns the current value of payment_product_filters.
17 18 19 |
# File 'lib/onlinepayments/sdk/domain/create_hosted_tokenization_request.rb', line 17 def payment_product_filters @payment_product_filters end |
#tokens ⇒ String
Returns the current value of tokens.
17 18 19 |
# File 'lib/onlinepayments/sdk/domain/create_hosted_tokenization_request.rb', line 17 def tokens @tokens end |
#variant ⇒ String
Returns the current value of variant.
17 18 19 |
# File 'lib/onlinepayments/sdk/domain/create_hosted_tokenization_request.rb', line 17 def variant @variant end |
Instance Method Details
#from_hash(hash) ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/onlinepayments/sdk/domain/create_hosted_tokenization_request.rb', line 43 def from_hash(hash) super if hash.has_key? 'askConsumerConsent' @ask_consumer_consent = hash['askConsumerConsent'] end if hash.has_key? 'creditCardSpecificInput' raise TypeError, "value '%s' is not a Hash" % [hash['creditCardSpecificInput']] unless hash['creditCardSpecificInput'].is_a? Hash @credit_card_specific_input = OnlinePayments::SDK::Domain::CreditCardSpecificInputHostedTokenization.new_from_hash(hash['creditCardSpecificInput']) end if hash.has_key? 'locale' @locale = hash['locale'] end if hash.has_key? 'paymentProductFilters' raise TypeError, "value '%s' is not a Hash" % [hash['paymentProductFilters']] unless hash['paymentProductFilters'].is_a? Hash @payment_product_filters = OnlinePayments::SDK::Domain::PaymentProductFiltersHostedTokenization.new_from_hash(hash['paymentProductFilters']) end if hash.has_key? 'tokens' @tokens = hash['tokens'] end if hash.has_key? 'variant' @variant = hash['variant'] end end |
#to_h ⇒ Hash
32 33 34 35 36 37 38 39 40 41 |
# File 'lib/onlinepayments/sdk/domain/create_hosted_tokenization_request.rb', line 32 def to_h hash = super hash['askConsumerConsent'] = @ask_consumer_consent unless @ask_consumer_consent.nil? hash['creditCardSpecificInput'] = @credit_card_specific_input.to_h unless @credit_card_specific_input.nil? hash['locale'] = @locale unless @locale.nil? hash['paymentProductFilters'] = @payment_product_filters.to_h unless @payment_product_filters.nil? hash['tokens'] = @tokens unless @tokens.nil? hash['variant'] = @variant unless @variant.nil? hash end |