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.
-
#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.
13 14 15 |
# File 'lib/onlinepayments/sdk/domain/create_hosted_tokenization_request.rb', line 13 def @ask_consumer_consent end |
#locale ⇒ String
Returns the current value of locale.
13 14 15 |
# File 'lib/onlinepayments/sdk/domain/create_hosted_tokenization_request.rb', line 13 def locale @locale end |
#tokens ⇒ String
Returns the current value of tokens.
13 14 15 |
# File 'lib/onlinepayments/sdk/domain/create_hosted_tokenization_request.rb', line 13 def tokens @tokens end |
#variant ⇒ String
Returns the current value of variant.
13 14 15 |
# File 'lib/onlinepayments/sdk/domain/create_hosted_tokenization_request.rb', line 13 def variant @variant end |
Instance Method Details
#from_hash(hash) ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/onlinepayments/sdk/domain/create_hosted_tokenization_request.rb', line 29 def from_hash(hash) super @ask_consumer_consent = hash['askConsumerConsent'] if hash.key? 'askConsumerConsent' @locale = hash['locale'] if hash.key? 'locale' @tokens = hash['tokens'] if hash.key? 'tokens' @variant = hash['variant'] if hash.key? 'variant' end |
#to_h ⇒ Hash
20 21 22 23 24 25 26 27 |
# File 'lib/onlinepayments/sdk/domain/create_hosted_tokenization_request.rb', line 20 def to_h hash = super hash['askConsumerConsent'] = @ask_consumer_consent unless @ask_consumer_consent.nil? hash['locale'] = @locale unless @locale.nil? hash['tokens'] = @tokens unless @tokens.nil? hash['variant'] = @variant unless @variant.nil? hash end |