Class: ThePlaidApi::BeaconReportSyndicationAnalysis

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/the_plaid_api/models/beacon_report_syndication_analysis.rb

Overview

Analysis of which fields matched between the originally reported Beacon User and the Beacon User that the report was syndicated to.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(address:, date_of_birth:, email_address:, name:, id_number:, ip_address:, phone_number:, depository_accounts:, additional_properties: nil) ⇒ BeaconReportSyndicationAnalysis

Returns a new instance of BeaconReportSyndicationAnalysis.



141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# File 'lib/the_plaid_api/models/beacon_report_syndication_analysis.rb', line 141

def initialize(address:, date_of_birth:, email_address:, name:, id_number:,
               ip_address:, phone_number:, depository_accounts:,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @address = address
  @date_of_birth = date_of_birth
  @email_address = email_address
  @name = name
  @id_number = id_number
  @ip_address = ip_address
  @phone_number = phone_number
  @depository_accounts = depository_accounts
  @additional_properties = additional_properties
end

Instance Attribute Details

#addressBeaconMatchSummaryCode

An enum indicating the match type between two Beacon Users. ‘match` indicates that the provided input data was a strong match against the other Beacon User. `partial_match` indicates the data approximately matched the other Beacon User. For example, “Knope” vs. “Knope-Wyatt” for last name. `no_match` indicates that Plaid was able to compare this field against the other Beacon User and it did not match the provided input data. `no_data` indicates that Plaid was unable to compare this field against the original Beacon User because the field was not present in one of the Beacon Users.



24
25
26
# File 'lib/the_plaid_api/models/beacon_report_syndication_analysis.rb', line 24

def address
  @address
end

#date_of_birthBeaconMatchSummaryCode

An enum indicating the match type between two Beacon Users. ‘match` indicates that the provided input data was a strong match against the other Beacon User. `partial_match` indicates the data approximately matched the other Beacon User. For example, “Knope” vs. “Knope-Wyatt” for last name. `no_match` indicates that Plaid was able to compare this field against the other Beacon User and it did not match the provided input data. `no_data` indicates that Plaid was unable to compare this field against the original Beacon User because the field was not present in one of the Beacon Users.



37
38
39
# File 'lib/the_plaid_api/models/beacon_report_syndication_analysis.rb', line 37

def date_of_birth
  @date_of_birth
end

#depository_accountsArray[BeaconSyndicatedReportDepositoryAccountMatchAnalysis]

An enum indicating the match type between two Beacon Users. ‘match` indicates that the provided input data was a strong match against the other Beacon User. `partial_match` indicates the data approximately matched the other Beacon User. For example, “Knope” vs. “Knope-Wyatt” for last name. `no_match` indicates that Plaid was able to compare this field against the other Beacon User and it did not match the provided input data. `no_data` indicates that Plaid was unable to compare this field against the original Beacon User because the field was not present in one of the Beacon Users.



115
116
117
# File 'lib/the_plaid_api/models/beacon_report_syndication_analysis.rb', line 115

def depository_accounts
  @depository_accounts
end

#email_addressBeaconMatchSummaryCode

An enum indicating the match type between two Beacon Users. ‘match` indicates that the provided input data was a strong match against the other Beacon User. `partial_match` indicates the data approximately matched the other Beacon User. For example, “Knope” vs. “Knope-Wyatt” for last name. `no_match` indicates that Plaid was able to compare this field against the other Beacon User and it did not match the provided input data. `no_data` indicates that Plaid was unable to compare this field against the original Beacon User because the field was not present in one of the Beacon Users.



50
51
52
# File 'lib/the_plaid_api/models/beacon_report_syndication_analysis.rb', line 50

def email_address
  @email_address
end

#id_numberBeaconMatchSummaryCode

An enum indicating the match type between two Beacon Users. ‘match` indicates that the provided input data was a strong match against the other Beacon User. `partial_match` indicates the data approximately matched the other Beacon User. For example, “Knope” vs. “Knope-Wyatt” for last name. `no_match` indicates that Plaid was able to compare this field against the other Beacon User and it did not match the provided input data. `no_data` indicates that Plaid was unable to compare this field against the original Beacon User because the field was not present in one of the Beacon Users.



76
77
78
# File 'lib/the_plaid_api/models/beacon_report_syndication_analysis.rb', line 76

def id_number
  @id_number
end

#ip_addressBeaconMatchSummaryCode

An enum indicating the match type between two Beacon Users. ‘match` indicates that the provided input data was a strong match against the other Beacon User. `partial_match` indicates the data approximately matched the other Beacon User. For example, “Knope” vs. “Knope-Wyatt” for last name. `no_match` indicates that Plaid was able to compare this field against the other Beacon User and it did not match the provided input data. `no_data` indicates that Plaid was unable to compare this field against the original Beacon User because the field was not present in one of the Beacon Users.



89
90
91
# File 'lib/the_plaid_api/models/beacon_report_syndication_analysis.rb', line 89

def ip_address
  @ip_address
end

#nameBeaconMatchSummaryCode

An enum indicating the match type between two Beacon Users. ‘match` indicates that the provided input data was a strong match against the other Beacon User. `partial_match` indicates the data approximately matched the other Beacon User. For example, “Knope” vs. “Knope-Wyatt” for last name. `no_match` indicates that Plaid was able to compare this field against the other Beacon User and it did not match the provided input data. `no_data` indicates that Plaid was unable to compare this field against the original Beacon User because the field was not present in one of the Beacon Users.



63
64
65
# File 'lib/the_plaid_api/models/beacon_report_syndication_analysis.rb', line 63

def name
  @name
end

#phone_numberBeaconMatchSummaryCode

An enum indicating the match type between two Beacon Users. ‘match` indicates that the provided input data was a strong match against the other Beacon User. `partial_match` indicates the data approximately matched the other Beacon User. For example, “Knope” vs. “Knope-Wyatt” for last name. `no_match` indicates that Plaid was able to compare this field against the other Beacon User and it did not match the provided input data. `no_data` indicates that Plaid was unable to compare this field against the original Beacon User because the field was not present in one of the Beacon Users.



102
103
104
# File 'lib/the_plaid_api/models/beacon_report_syndication_analysis.rb', line 102

def phone_number
  @phone_number
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# File 'lib/the_plaid_api/models/beacon_report_syndication_analysis.rb', line 159

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  address = hash.key?('address') ? hash['address'] : nil
  date_of_birth = hash.key?('date_of_birth') ? hash['date_of_birth'] : nil
  email_address = hash.key?('email_address') ? hash['email_address'] : nil
  name = hash.key?('name') ? hash['name'] : nil
  id_number = hash.key?('id_number') ? hash['id_number'] : nil
  ip_address = hash.key?('ip_address') ? hash['ip_address'] : nil
  phone_number = hash.key?('phone_number') ? hash['phone_number'] : nil
  # Parameter is an array, so we need to iterate through it
  depository_accounts = nil
  unless hash['depository_accounts'].nil?
    depository_accounts = []
    hash['depository_accounts'].each do |structure|
      depository_accounts << (BeaconSyndicatedReportDepositoryAccountMatchAnalysis.from_hash(structure) if structure)
    end
  end

  depository_accounts = nil unless hash.key?('depository_accounts')

  # 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.
  BeaconReportSyndicationAnalysis.new(address: address,
                                      date_of_birth: date_of_birth,
                                      email_address: email_address,
                                      name: name,
                                      id_number: id_number,
                                      ip_address: ip_address,
                                      phone_number: phone_number,
                                      depository_accounts: depository_accounts,
                                      additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



118
119
120
121
122
123
124
125
126
127
128
129
# File 'lib/the_plaid_api/models/beacon_report_syndication_analysis.rb', line 118

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['address'] = 'address'
  @_hash['date_of_birth'] = 'date_of_birth'
  @_hash['email_address'] = 'email_address'
  @_hash['name'] = 'name'
  @_hash['id_number'] = 'id_number'
  @_hash['ip_address'] = 'ip_address'
  @_hash['phone_number'] = 'phone_number'
  @_hash['depository_accounts'] = 'depository_accounts'
  @_hash
end

.nullablesObject

An array for nullable fields



137
138
139
# File 'lib/the_plaid_api/models/beacon_report_syndication_analysis.rb', line 137

def self.nullables
  []
end

.optionalsObject

An array for optional fields



132
133
134
# File 'lib/the_plaid_api/models/beacon_report_syndication_analysis.rb', line 132

def self.optionals
  []
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



210
211
212
213
214
215
216
217
# File 'lib/the_plaid_api/models/beacon_report_syndication_analysis.rb', line 210

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} address: #{@address.inspect}, date_of_birth: #{@date_of_birth.inspect},"\
  " email_address: #{@email_address.inspect}, name: #{@name.inspect}, id_number:"\
  " #{@id_number.inspect}, ip_address: #{@ip_address.inspect}, phone_number:"\
  " #{@phone_number.inspect}, depository_accounts: #{@depository_accounts.inspect},"\
  " additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



201
202
203
204
205
206
207
# File 'lib/the_plaid_api/models/beacon_report_syndication_analysis.rb', line 201

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} address: #{@address}, date_of_birth: #{@date_of_birth}, email_address:"\
  " #{@email_address}, name: #{@name}, id_number: #{@id_number}, ip_address: #{@ip_address},"\
  " phone_number: #{@phone_number}, depository_accounts: #{@depository_accounts},"\
  " additional_properties: #{@additional_properties}>"
end