Class: OnlinePayments::SDK::Domain::CreateHostedTokenizationRequest

Inherits:
OnlinePayments::SDK::DataObject show all
Defined in:
lib/onlinepayments/sdk/domain/create_hosted_tokenization_request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from OnlinePayments::SDK::DataObject

new_from_hash

Instance Attribute Details

Returns the current value of ask_consumer_consent.

Returns:

  • (true/false)

    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
  @ask_consumer_consent
end

#localeString

Returns the current value of locale.

Returns:

  • (String)

    the current value of locale



13
14
15
# File 'lib/onlinepayments/sdk/domain/create_hosted_tokenization_request.rb', line 13

def locale
  @locale
end

#tokensString

Returns the current value of tokens.

Returns:

  • (String)

    the current value of tokens



13
14
15
# File 'lib/onlinepayments/sdk/domain/create_hosted_tokenization_request.rb', line 13

def tokens
  @tokens
end

#variantString

Returns the current value of variant.

Returns:

  • (String)

    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_hHash

Returns:

  • (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