Class: ThePlaidApi::BeaconDuplicateGetResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::BeaconDuplicateGetResponse
- Defined in:
- lib/the_plaid_api/models/beacon_duplicate_get_response.rb
Overview
A Beacon Duplicate represents a pair of matching Beacon Users and an analysis of the fields they matched on.
Instance Attribute Summary collapse
-
#analysis ⇒ BeaconMatchSummaryAnalysis
Analysis of which fields matched between one Beacon User and another.
-
#beacon_user1 ⇒ BeaconUserRevision
A Beacon User Revision identifies a Beacon User at some point in its revision history.
-
#beacon_user2 ⇒ BeaconUserRevision
A Beacon User Revision identifies a Beacon User at some point in its revision history.
-
#id ⇒ String
ID of the associated Beacon Duplicate.
-
#request_id ⇒ String
A unique identifier for the request, which can be used for troubleshooting.
Class Method Summary collapse
-
.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(id:, beacon_user1:, beacon_user2:, analysis:, request_id:, additional_properties: nil) ⇒ BeaconDuplicateGetResponse
constructor
A new instance of BeaconDuplicateGetResponse.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the 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(id:, beacon_user1:, beacon_user2:, analysis:, request_id:, additional_properties: nil) ⇒ BeaconDuplicateGetResponse
Returns a new instance of BeaconDuplicateGetResponse.
58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/the_plaid_api/models/beacon_duplicate_get_response.rb', line 58 def initialize(id:, beacon_user1:, beacon_user2:, analysis:, request_id:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @id = id @beacon_user1 = beacon_user1 @beacon_user2 = beacon_user2 @analysis = analysis @request_id = request_id @additional_properties = additional_properties end |
Instance Attribute Details
#analysis ⇒ BeaconMatchSummaryAnalysis
Analysis of which fields matched between one Beacon User and another.
29 30 31 |
# File 'lib/the_plaid_api/models/beacon_duplicate_get_response.rb', line 29 def analysis @analysis end |
#beacon_user1 ⇒ BeaconUserRevision
A Beacon User Revision identifies a Beacon User at some point in its revision history.
20 21 22 |
# File 'lib/the_plaid_api/models/beacon_duplicate_get_response.rb', line 20 def beacon_user1 @beacon_user1 end |
#beacon_user2 ⇒ BeaconUserRevision
A Beacon User Revision identifies a Beacon User at some point in its revision history.
25 26 27 |
# File 'lib/the_plaid_api/models/beacon_duplicate_get_response.rb', line 25 def beacon_user2 @beacon_user2 end |
#id ⇒ String
ID of the associated Beacon Duplicate.
15 16 17 |
# File 'lib/the_plaid_api/models/beacon_duplicate_get_response.rb', line 15 def id @id end |
#request_id ⇒ String
A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive.
35 36 37 |
# File 'lib/the_plaid_api/models/beacon_duplicate_get_response.rb', line 35 def request_id @request_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/the_plaid_api/models/beacon_duplicate_get_response.rb', line 72 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. id = hash.key?('id') ? hash['id'] : nil beacon_user1 = BeaconUserRevision.from_hash(hash['beacon_user1']) if hash['beacon_user1'] beacon_user2 = BeaconUserRevision.from_hash(hash['beacon_user2']) if hash['beacon_user2'] analysis = BeaconMatchSummaryAnalysis.from_hash(hash['analysis']) if hash['analysis'] request_id = hash.key?('request_id') ? hash['request_id'] : nil # 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. BeaconDuplicateGetResponse.new(id: id, beacon_user1: beacon_user1, beacon_user2: beacon_user2, analysis: analysis, request_id: request_id, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
38 39 40 41 42 43 44 45 46 |
# File 'lib/the_plaid_api/models/beacon_duplicate_get_response.rb', line 38 def self.names @_hash = {} if @_hash.nil? @_hash['id'] = 'id' @_hash['beacon_user1'] = 'beacon_user1' @_hash['beacon_user2'] = 'beacon_user2' @_hash['analysis'] = 'analysis' @_hash['request_id'] = 'request_id' @_hash end |
.nullables ⇒ Object
An array for nullable fields
54 55 56 |
# File 'lib/the_plaid_api/models/beacon_duplicate_get_response.rb', line 54 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
49 50 51 |
# File 'lib/the_plaid_api/models/beacon_duplicate_get_response.rb', line 49 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
107 108 109 110 111 112 |
# File 'lib/the_plaid_api/models/beacon_duplicate_get_response.rb', line 107 def inspect class_name = self.class.name.split('::').last "<#{class_name} id: #{@id.inspect}, beacon_user1: #{@beacon_user1.inspect}, beacon_user2:"\ " #{@beacon_user2.inspect}, analysis: #{@analysis.inspect}, request_id:"\ " #{@request_id.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
99 100 101 102 103 104 |
# File 'lib/the_plaid_api/models/beacon_duplicate_get_response.rb', line 99 def to_s class_name = self.class.name.split('::').last "<#{class_name} id: #{@id}, beacon_user1: #{@beacon_user1}, beacon_user2: #{@beacon_user2},"\ " analysis: #{@analysis}, request_id: #{@request_id}, additional_properties:"\ " #{@additional_properties}>" end |