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

Inherits:
DataObject
  • Object
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 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



25
26
27
28
29
30
31
32
33
# File 'lib/onlinepayments/sdk/domain/credit_card_validation_rules_hosted_tokenization.rb', line 25

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

#to_hHash

Returns:

  • (Hash)


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

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