Class: ThePlaidApi::KycCheckDetailsInternationalAddress

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

Overview

Result summary object specifying how the ‘address` field matched for fields that are only present on an international KYC check.

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(building:, county:, district:, house_number:, subpremise:, thoroughfare:, additional_properties: nil) ⇒ KycCheckDetailsInternationalAddress

Returns a new instance of KycCheckDetailsInternationalAddress.



125
126
127
128
129
130
131
132
133
134
135
136
137
# File 'lib/the_plaid_api/models/kyc_check_details_international_address.rb', line 125

def initialize(building:, county:, district:, house_number:, subpremise:,
               thoroughfare:, additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @building = building
  @county = county
  @district = district
  @house_number = house_number
  @subpremise = subpremise
  @thoroughfare = thoroughfare
  @additional_properties = additional_properties
end

Instance Attribute Details

#buildingMatchSummaryCode1

An enum indicating the match type between data provided by user and data checked against an external data source. ‘match` indicates that the provided input data was a strong match against external data. `partial_match` indicates the data approximately matched against external data. For example, “Knope” vs. “Knope-Wyatt” for last name. `no_match` indicates that Plaid was able to perform a check against an external data source and it did not match the provided input data. `no_data` indicates that Plaid was unable to find external data to compare against the provided input data. `no_input` indicates that Plaid was unable to perform a check because no information was provided for this field by the end user.

Returns:



26
27
28
# File 'lib/the_plaid_api/models/kyc_check_details_international_address.rb', line 26

def building
  @building
end

#countyMatchSummaryCode1

An enum indicating the match type between data provided by user and data checked against an external data source. ‘match` indicates that the provided input data was a strong match against external data. `partial_match` indicates the data approximately matched against external data. For example, “Knope” vs. “Knope-Wyatt” for last name. `no_match` indicates that Plaid was able to perform a check against an external data source and it did not match the provided input data. `no_data` indicates that Plaid was unable to find external data to compare against the provided input data. `no_input` indicates that Plaid was unable to perform a check because no information was provided for this field by the end user.

Returns:



41
42
43
# File 'lib/the_plaid_api/models/kyc_check_details_international_address.rb', line 41

def county
  @county
end

#districtMatchSummaryCode1

An enum indicating the match type between data provided by user and data checked against an external data source. ‘match` indicates that the provided input data was a strong match against external data. `partial_match` indicates the data approximately matched against external data. For example, “Knope” vs. “Knope-Wyatt” for last name. `no_match` indicates that Plaid was able to perform a check against an external data source and it did not match the provided input data. `no_data` indicates that Plaid was unable to find external data to compare against the provided input data. `no_input` indicates that Plaid was unable to perform a check because no information was provided for this field by the end user.

Returns:



56
57
58
# File 'lib/the_plaid_api/models/kyc_check_details_international_address.rb', line 56

def district
  @district
end

#house_numberMatchSummaryCode1

An enum indicating the match type between data provided by user and data checked against an external data source. ‘match` indicates that the provided input data was a strong match against external data. `partial_match` indicates the data approximately matched against external data. For example, “Knope” vs. “Knope-Wyatt” for last name. `no_match` indicates that Plaid was able to perform a check against an external data source and it did not match the provided input data. `no_data` indicates that Plaid was unable to find external data to compare against the provided input data. `no_input` indicates that Plaid was unable to perform a check because no information was provided for this field by the end user.

Returns:



71
72
73
# File 'lib/the_plaid_api/models/kyc_check_details_international_address.rb', line 71

def house_number
  @house_number
end

#subpremiseMatchSummaryCode1

An enum indicating the match type between data provided by user and data checked against an external data source. ‘match` indicates that the provided input data was a strong match against external data. `partial_match` indicates the data approximately matched against external data. For example, “Knope” vs. “Knope-Wyatt” for last name. `no_match` indicates that Plaid was able to perform a check against an external data source and it did not match the provided input data. `no_data` indicates that Plaid was unable to find external data to compare against the provided input data. `no_input` indicates that Plaid was unable to perform a check because no information was provided for this field by the end user.

Returns:



86
87
88
# File 'lib/the_plaid_api/models/kyc_check_details_international_address.rb', line 86

def subpremise
  @subpremise
end

#thoroughfareMatchSummaryCode1

An enum indicating the match type between data provided by user and data checked against an external data source. ‘match` indicates that the provided input data was a strong match against external data. `partial_match` indicates the data approximately matched against external data. For example, “Knope” vs. “Knope-Wyatt” for last name. `no_match` indicates that Plaid was able to perform a check against an external data source and it did not match the provided input data. `no_data` indicates that Plaid was unable to find external data to compare against the provided input data. `no_input` indicates that Plaid was unable to perform a check because no information was provided for this field by the end user.

Returns:



101
102
103
# File 'lib/the_plaid_api/models/kyc_check_details_international_address.rb', line 101

def thoroughfare
  @thoroughfare
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# File 'lib/the_plaid_api/models/kyc_check_details_international_address.rb', line 140

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  building = hash.key?('building') ? hash['building'] : nil
  county = hash.key?('county') ? hash['county'] : nil
  district = hash.key?('district') ? hash['district'] : nil
  house_number = hash.key?('house_number') ? hash['house_number'] : nil
  subpremise = hash.key?('subpremise') ? hash['subpremise'] : nil
  thoroughfare = hash.key?('thoroughfare') ? hash['thoroughfare'] : 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.
  KycCheckDetailsInternationalAddress.new(building: building,
                                          county: county,
                                          district: district,
                                          house_number: house_number,
                                          subpremise: subpremise,
                                          thoroughfare: thoroughfare,
                                          additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



104
105
106
107
108
109
110
111
112
113
# File 'lib/the_plaid_api/models/kyc_check_details_international_address.rb', line 104

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['building'] = 'building'
  @_hash['county'] = 'county'
  @_hash['district'] = 'district'
  @_hash['house_number'] = 'house_number'
  @_hash['subpremise'] = 'subpremise'
  @_hash['thoroughfare'] = 'thoroughfare'
  @_hash
end

.nullablesObject

An array for nullable fields



121
122
123
# File 'lib/the_plaid_api/models/kyc_check_details_international_address.rb', line 121

def self.nullables
  []
end

.optionalsObject

An array for optional fields



116
117
118
# File 'lib/the_plaid_api/models/kyc_check_details_international_address.rb', line 116

def self.optionals
  []
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



177
178
179
180
181
182
183
# File 'lib/the_plaid_api/models/kyc_check_details_international_address.rb', line 177

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} building: #{@building.inspect}, county: #{@county.inspect}, district:"\
  " #{@district.inspect}, house_number: #{@house_number.inspect}, subpremise:"\
  " #{@subpremise.inspect}, thoroughfare: #{@thoroughfare.inspect}, additional_properties:"\
  " #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



169
170
171
172
173
174
# File 'lib/the_plaid_api/models/kyc_check_details_international_address.rb', line 169

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} building: #{@building}, county: #{@county}, district: #{@district},"\
  " house_number: #{@house_number}, subpremise: #{@subpremise}, thoroughfare:"\
  " #{@thoroughfare}, additional_properties: #{@additional_properties}>"
end