Class: CyberSourceMergedSpec::AuthenticatedIdentity
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::AuthenticatedIdentity
- Defined in:
- lib/cyber_source_merged_spec/models/authenticated_identity.rb
Overview
AuthenticatedIdentity Model.
Instance Attribute Summary collapse
-
#data ⇒ String
Data related to the authenticated identity.
-
#id ⇒ String
Unique identifier for the authenticated identity.
-
#provider ⇒ Provider
Provider of the authenticated identity.
-
#relying_party_id ⇒ String
Identifier of the relying party that requested the authentication.
-
#user_authentication_method ⇒ UserAuthenticationMethod
The method used to authenticate the user.
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(data: SKIP, provider: SKIP, id: SKIP, relying_party_id: SKIP, user_authentication_method: SKIP, additional_properties: nil) ⇒ AuthenticatedIdentity
constructor
A new instance of AuthenticatedIdentity.
-
#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(data: SKIP, provider: SKIP, id: SKIP, relying_party_id: SKIP, user_authentication_method: SKIP, additional_properties: nil) ⇒ AuthenticatedIdentity
Returns a new instance of AuthenticatedIdentity.
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/cyber_source_merged_spec/models/authenticated_identity.rb', line 62 def initialize(data: SKIP, provider: SKIP, id: SKIP, relying_party_id: SKIP, user_authentication_method: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @data = data unless data == SKIP @provider = provider unless provider == SKIP @id = id unless id == SKIP @relying_party_id = unless == SKIP unless user_authentication_method == SKIP @user_authentication_method = user_authentication_method end @additional_properties = additional_properties end |
Instance Attribute Details
#data ⇒ String
Data related to the authenticated identity. Contains verification payload from the identity provider.
15 16 17 |
# File 'lib/cyber_source_merged_spec/models/authenticated_identity.rb', line 15 def data @data end |
#id ⇒ String
Unique identifier for the authenticated identity. A distinctive and non-transparent identifier for correlation purposes.
25 26 27 |
# File 'lib/cyber_source_merged_spec/models/authenticated_identity.rb', line 25 def id @id end |
#provider ⇒ Provider
Provider of the authenticated identity. Identifies the authentication service or identity provider.
20 21 22 |
# File 'lib/cyber_source_merged_spec/models/authenticated_identity.rb', line 20 def provider @provider end |
#relying_party_id ⇒ String
Identifier of the relying party that requested the authentication.
29 30 31 |
# File 'lib/cyber_source_merged_spec/models/authenticated_identity.rb', line 29 def @relying_party_id end |
#user_authentication_method ⇒ UserAuthenticationMethod
The method used to authenticate the user.
33 34 35 |
# File 'lib/cyber_source_merged_spec/models/authenticated_identity.rb', line 33 def user_authentication_method @user_authentication_method end |
Class Method Details
.from_element(root) ⇒ Object
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/cyber_source_merged_spec/models/authenticated_identity.rb', line 107 def self.from_element(root) data = XmlUtilities.from_element(root, 'data', String) provider = XmlUtilities.from_element(root, 'provider', String) id = XmlUtilities.from_element(root, 'id', String) = XmlUtilities.from_element(root, 'relyingPartyId', String) user_authentication_method = XmlUtilities.from_element( root, 'userAuthenticationMethod', String ) new(data: data, provider: provider, id: id, relying_party_id: , user_authentication_method: user_authentication_method, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/cyber_source_merged_spec/models/authenticated_identity.rb', line 79 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. data = hash.key?('data') ? hash['data'] : SKIP provider = hash.key?('provider') ? hash['provider'] : SKIP id = hash.key?('id') ? hash['id'] : SKIP = hash.key?('relyingPartyId') ? hash['relyingPartyId'] : SKIP user_authentication_method = hash.key?('userAuthenticationMethod') ? hash['userAuthenticationMethod'] : 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. AuthenticatedIdentity.new(data: data, provider: provider, id: id, relying_party_id: , user_authentication_method: user_authentication_method, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
36 37 38 39 40 41 42 43 44 |
# File 'lib/cyber_source_merged_spec/models/authenticated_identity.rb', line 36 def self.names @_hash = {} if @_hash.nil? @_hash['data'] = 'data' @_hash['provider'] = 'provider' @_hash['id'] = 'id' @_hash['relying_party_id'] = 'relyingPartyId' @_hash['user_authentication_method'] = 'userAuthenticationMethod' @_hash end |
.nullables ⇒ Object
An array for nullable fields
58 59 60 |
# File 'lib/cyber_source_merged_spec/models/authenticated_identity.rb', line 58 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
47 48 49 50 51 52 53 54 55 |
# File 'lib/cyber_source_merged_spec/models/authenticated_identity.rb', line 47 def self.optionals %w[ data provider id relying_party_id user_authentication_method ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
150 151 152 153 154 155 |
# File 'lib/cyber_source_merged_spec/models/authenticated_identity.rb', line 150 def inspect class_name = self.class.name.split('::').last "<#{class_name} data: #{@data.inspect}, provider: #{@provider.inspect}, id: #{@id.inspect},"\ " relying_party_id: #{@relying_party_id.inspect}, user_authentication_method:"\ " #{@user_authentication_method.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
142 143 144 145 146 147 |
# File 'lib/cyber_source_merged_spec/models/authenticated_identity.rb', line 142 def to_s class_name = self.class.name.split('::').last "<#{class_name} data: #{@data}, provider: #{@provider}, id: #{@id}, relying_party_id:"\ " #{@relying_party_id}, user_authentication_method: #{@user_authentication_method},"\ " additional_properties: #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/cyber_source_merged_spec/models/authenticated_identity.rb', line 125 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'data', data) XmlUtilities.add_as_subelement(doc, root, 'provider', provider) XmlUtilities.add_as_subelement(doc, root, 'id', id) XmlUtilities.add_as_subelement(doc, root, 'relyingPartyId', ) XmlUtilities.add_as_subelement(doc, root, 'userAuthenticationMethod', user_authentication_method) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |