Class: OnlinePayments::SDK::Domain::CreditCardValidationRulesHostedTokenization

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from OnlinePayments::SDK::DataObject

new_from_hash

Instance Attribute Details

#cvv_mandatory_for_existing_tokentrue/false

Returns the current value of cvv_mandatory_for_existing_token.

Returns:

  • (true/false)

    the current value of cvv_mandatory_for_existing_token



11
12
13
# File 'lib/onlinepayments/sdk/domain/credit_card_validation_rules_hosted_tokenization.rb', line 11

def cvv_mandatory_for_existing_token
  @cvv_mandatory_for_existing_token
end

#cvv_mandatory_for_new_tokentrue/false

Returns the current value of cvv_mandatory_for_new_token.

Returns:

  • (true/false)

    the current value of cvv_mandatory_for_new_token



11
12
13
# File 'lib/onlinepayments/sdk/domain/credit_card_validation_rules_hosted_tokenization.rb', line 11

def cvv_mandatory_for_new_token
  @cvv_mandatory_for_new_token
end

Instance Method Details

#from_hash(hash) ⇒ Object



23
24
25
26
27
# File 'lib/onlinepayments/sdk/domain/credit_card_validation_rules_hosted_tokenization.rb', line 23

def from_hash(hash)
  super
  @cvv_mandatory_for_existing_token = hash['cvvMandatoryForExistingToken'] if hash.key? 'cvvMandatoryForExistingToken'
  @cvv_mandatory_for_new_token = hash['cvvMandatoryForNewToken'] if hash.key? 'cvvMandatoryForNewToken'
end

#to_hHash

Returns:

  • (Hash)


16
17
18
19
20
21
# File 'lib/onlinepayments/sdk/domain/credit_card_validation_rules_hosted_tokenization.rb', line 16

def to_h
  hash = super
  hash['cvvMandatoryForExistingToken'] = @cvv_mandatory_for_existing_token unless @cvv_mandatory_for_existing_token.nil?
  hash['cvvMandatoryForNewToken'] = @cvv_mandatory_for_new_token unless @cvv_mandatory_for_new_token.nil?
  hash
end