Class: CyberSourceMergedSpec::TokenProvisioningInformation
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::TokenProvisioningInformation
- Defined in:
- lib/cyber_source_merged_spec/models/token_provisioning_information.rb
Overview
TokenProvisioningInformation Model.
Instance Attribute Summary collapse
-
#consumer_consent_obtained ⇒ TrueClass | FalseClass
Flag that indicates whether the user consented to the tokenization of their credentials.
-
#multi_factor_authenticated ⇒ TrueClass | FalseClass
Flag that indicates whether AFA (Additional Factor of Authentication) for the PAN was completed.
Class Method Summary collapse
- .from_element(root) ⇒ Object
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(consumer_consent_obtained: SKIP, multi_factor_authenticated: SKIP, additional_properties: nil) ⇒ TokenProvisioningInformation
constructor
A new instance of TokenProvisioningInformation.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
- #to_xml_element(doc, root_name) ⇒ Object
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(consumer_consent_obtained: SKIP, multi_factor_authenticated: SKIP, additional_properties: nil) ⇒ TokenProvisioningInformation
Returns a new instance of TokenProvisioningInformation.
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/cyber_source_merged_spec/models/token_provisioning_information.rb', line 52 def initialize(consumer_consent_obtained: SKIP, multi_factor_authenticated: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? unless == SKIP @consumer_consent_obtained = end unless multi_factor_authenticated == SKIP @multi_factor_authenticated = multi_factor_authenticated end @additional_properties = additional_properties end |
Instance Attribute Details
#consumer_consent_obtained ⇒ TrueClass | FalseClass
Flag that indicates whether the user consented to the tokenization of their credentials. Required for card network tokenization in certain markets, such as India. Possible Values:
true: Consumer has consented to tokenization of their credentials.false: Consumer has not consented to tokenization of their credentials.
20 21 22 |
# File 'lib/cyber_source_merged_spec/models/token_provisioning_information.rb', line 20 def @consumer_consent_obtained end |
#multi_factor_authenticated ⇒ TrueClass | FalseClass
Flag that indicates whether AFA (Additional Factor of Authentication) for the PAN was completed. Required for card network tokenization in certain markets, such as India. Possible Values:
true: Consumer has been authenticated by the issuer.false: Consumer has not been authenticated by the issuer.
29 30 31 |
# File 'lib/cyber_source_merged_spec/models/token_provisioning_information.rb', line 29 def multi_factor_authenticated @multi_factor_authenticated end |
Class Method Details
.from_element(root) ⇒ Object
91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/cyber_source_merged_spec/models/token_provisioning_information.rb', line 91 def self.from_element(root) = XmlUtilities.from_element( root, 'consumerConsentObtained', TrueClass ) multi_factor_authenticated = XmlUtilities.from_element( root, 'multiFactorAuthenticated', TrueClass ) new(consumer_consent_obtained: , multi_factor_authenticated: multi_factor_authenticated, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/cyber_source_merged_spec/models/token_provisioning_information.rb', line 69 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. = hash.key?('consumerConsentObtained') ? hash['consumerConsentObtained'] : SKIP multi_factor_authenticated = hash.key?('multiFactorAuthenticated') ? hash['multiFactorAuthenticated'] : SKIP # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. TokenProvisioningInformation.new(consumer_consent_obtained: , multi_factor_authenticated: multi_factor_authenticated, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
32 33 34 35 36 37 |
# File 'lib/cyber_source_merged_spec/models/token_provisioning_information.rb', line 32 def self.names @_hash = {} if @_hash.nil? @_hash['consumer_consent_obtained'] = 'consumerConsentObtained' @_hash['multi_factor_authenticated'] = 'multiFactorAuthenticated' @_hash end |
.nullables ⇒ Object
An array for nullable fields
48 49 50 |
# File 'lib/cyber_source_merged_spec/models/token_provisioning_information.rb', line 48 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
40 41 42 43 44 45 |
# File 'lib/cyber_source_merged_spec/models/token_provisioning_information.rb', line 40 def self.optionals %w[ consumer_consent_obtained multi_factor_authenticated ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
126 127 128 129 130 131 |
# File 'lib/cyber_source_merged_spec/models/token_provisioning_information.rb', line 126 def inspect class_name = self.class.name.split('::').last "<#{class_name} consumer_consent_obtained: #{@consumer_consent_obtained.inspect},"\ " multi_factor_authenticated: #{@multi_factor_authenticated.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
118 119 120 121 122 123 |
# File 'lib/cyber_source_merged_spec/models/token_provisioning_information.rb', line 118 def to_s class_name = self.class.name.split('::').last "<#{class_name} consumer_consent_obtained: #{@consumer_consent_obtained},"\ " multi_factor_authenticated: #{@multi_factor_authenticated}, additional_properties:"\ " #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/cyber_source_merged_spec/models/token_provisioning_information.rb', line 104 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'consumerConsentObtained', ) XmlUtilities.add_as_subelement(doc, root, 'multiFactorAuthenticated', multi_factor_authenticated) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |