Class: OnlinePayments::SDK::Domain::CreateHostedTokenizationRequest
- Inherits:
-
OnlinePayments::SDK::DataObject
- Object
- OnlinePayments::SDK::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.
-
#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 OnlinePayments::SDK::DataObject
Instance Attribute Details
#ask_consumer_consent ⇒ true/false
Returns the current value of ask_consumer_consent.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/create_hosted_tokenization_request.rb', line 15 def @ask_consumer_consent end |
#locale ⇒ String
Returns the current value of locale.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/create_hosted_tokenization_request.rb', line 15 def locale @locale end |
#payment_product_filters ⇒ OnlinePayments::SDK::Domain::PaymentProductFiltersHostedTokenization
Returns the current value of payment_product_filters.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/create_hosted_tokenization_request.rb', line 15 def payment_product_filters @payment_product_filters end |
#tokens ⇒ String
Returns the current value of tokens.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/create_hosted_tokenization_request.rb', line 15 def tokens @tokens end |
#variant ⇒ String
Returns the current value of variant.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/create_hosted_tokenization_request.rb', line 15 def variant @variant end |
Instance Method Details
#from_hash(hash) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/onlinepayments/sdk/domain/create_hosted_tokenization_request.rb', line 33 def from_hash(hash) super @ask_consumer_consent = hash['askConsumerConsent'] if hash.key? 'askConsumerConsent' @locale = hash['locale'] if hash.key? 'locale' if hash.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 @tokens = hash['tokens'] if hash.key? 'tokens' @variant = hash['variant'] if hash.key? 'variant' end |
#to_h ⇒ Hash
23 24 25 26 27 28 29 30 31 |
# File 'lib/onlinepayments/sdk/domain/create_hosted_tokenization_request.rb', line 23 def to_h hash = super hash['askConsumerConsent'] = @ask_consumer_consent unless @ask_consumer_consent.nil? hash['locale'] = @locale unless @locale.nil? hash['paymentProductFilters'] = @payment_product_filters.to_h if @payment_product_filters hash['tokens'] = @tokens unless @tokens.nil? hash['variant'] = @variant unless @variant.nil? hash end |