Class: ThePlaidApi::KycCheckAddressSummary
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::KycCheckAddressSummary
- Defined in:
- lib/the_plaid_api/models/kyc_check_address_summary.rb
Overview
Result summary object specifying how the ‘address` field matched.
Instance Attribute Summary collapse
-
#city ⇒ MatchSummaryCode1
An enum indicating the match type between data provided by user and data checked against an external data source.
-
#international_details ⇒ KycCheckDetailsInternationalAddress
Result summary object specifying how the ‘address` field matched for fields that are only present on an international KYC check.
-
#po_box ⇒ PoBoxStatus
Field describing whether the associated address is a post office box.
-
#postal_code ⇒ MatchSummaryCode1
An enum indicating the match type between data provided by user and data checked against an external data source.
-
#region ⇒ MatchSummaryCode1
An enum indicating the match type between data provided by user and data checked against an external data source.
-
#street ⇒ MatchSummaryCode1
An enum indicating the match type between data provided by user and data checked against an external data source.
-
#summary ⇒ MatchSummaryCode1
An enum indicating the match type between data provided by user and data checked against an external data source.
-
#type ⇒ AddressPurposeLabel
Field describing whether the associated address is being used for commercial or residential purposes.
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(summary:, po_box:, type:, street: SKIP, city: SKIP, region: SKIP, postal_code: SKIP, international_details: SKIP, additional_properties: nil) ⇒ KycCheckAddressSummary
constructor
A new instance of KycCheckAddressSummary.
-
#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(summary:, po_box:, type:, street: SKIP, city: SKIP, region: SKIP, postal_code: SKIP, international_details: SKIP, additional_properties: nil) ⇒ KycCheckAddressSummary
Returns a new instance of KycCheckAddressSummary.
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/the_plaid_api/models/kyc_check_address_summary.rb', line 138 def initialize(summary:, po_box:, type:, street: SKIP, city: SKIP, region: SKIP, postal_code: SKIP, international_details: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @summary = summary @po_box = po_box @type = type @street = street unless street == SKIP @city = city unless city == SKIP @region = region unless region == SKIP @postal_code = postal_code unless postal_code == SKIP @international_details = international_details unless international_details == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#city ⇒ MatchSummaryCode1
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.
69 70 71 |
# File 'lib/the_plaid_api/models/kyc_check_address_summary.rb', line 69 def city @city end |
#international_details ⇒ KycCheckDetailsInternationalAddress
Result summary object specifying how the ‘address` field matched for fields that are only present on an international KYC check.
104 105 106 |
# File 'lib/the_plaid_api/models/kyc_check_address_summary.rb', line 104 def international_details @international_details end |
#po_box ⇒ PoBoxStatus
Field describing whether the associated address is a post office box. Will be ‘yes` when a P.O. box is detected, `no` when Plaid confirmed the address is not a P.O. box, and `no_data` when Plaid was not able to determine if the address is a P.O. box.
32 33 34 |
# File 'lib/the_plaid_api/models/kyc_check_address_summary.rb', line 32 def po_box @po_box end |
#postal_code ⇒ MatchSummaryCode1
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.
99 100 101 |
# File 'lib/the_plaid_api/models/kyc_check_address_summary.rb', line 99 def postal_code @postal_code end |
#region ⇒ MatchSummaryCode1
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.
84 85 86 |
# File 'lib/the_plaid_api/models/kyc_check_address_summary.rb', line 84 def region @region end |
#street ⇒ MatchSummaryCode1
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.
54 55 56 |
# File 'lib/the_plaid_api/models/kyc_check_address_summary.rb', line 54 def street @street end |
#summary ⇒ MatchSummaryCode1
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.
25 26 27 |
# File 'lib/the_plaid_api/models/kyc_check_address_summary.rb', line 25 def summary @summary end |
#type ⇒ AddressPurposeLabel
Field describing whether the associated address is being used for commercial or residential purposes. Note: This value will be ‘no_data` when Plaid does not have sufficient data to determine the address’s use.
39 40 41 |
# File 'lib/the_plaid_api/models/kyc_check_address_summary.rb', line 39 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
156 157 158 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 |
# File 'lib/the_plaid_api/models/kyc_check_address_summary.rb', line 156 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. summary = hash.key?('summary') ? hash['summary'] : nil po_box = hash.key?('po_box') ? hash['po_box'] : nil type = hash.key?('type') ? hash['type'] : nil street = hash.key?('street') ? hash['street'] : SKIP city = hash.key?('city') ? hash['city'] : SKIP region = hash.key?('region') ? hash['region'] : SKIP postal_code = hash.key?('postal_code') ? hash['postal_code'] : SKIP if hash['international_details'] international_details = KycCheckDetailsInternationalAddress.from_hash(hash['international_details']) end # 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. KycCheckAddressSummary.new(summary: summary, po_box: po_box, type: type, street: street, city: city, region: region, postal_code: postal_code, international_details: international_details, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/the_plaid_api/models/kyc_check_address_summary.rb', line 107 def self.names @_hash = {} if @_hash.nil? @_hash['summary'] = 'summary' @_hash['po_box'] = 'po_box' @_hash['type'] = 'type' @_hash['street'] = 'street' @_hash['city'] = 'city' @_hash['region'] = 'region' @_hash['postal_code'] = 'postal_code' @_hash['international_details'] = 'international_details' @_hash end |
.nullables ⇒ Object
An array for nullable fields
132 133 134 135 136 |
# File 'lib/the_plaid_api/models/kyc_check_address_summary.rb', line 132 def self.nullables %w[ international_details ] end |
.optionals ⇒ Object
An array for optional fields
121 122 123 124 125 126 127 128 129 |
# File 'lib/the_plaid_api/models/kyc_check_address_summary.rb', line 121 def self.optionals %w[ street city region postal_code international_details ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
200 201 202 203 204 205 206 |
# File 'lib/the_plaid_api/models/kyc_check_address_summary.rb', line 200 def inspect class_name = self.class.name.split('::').last "<#{class_name} summary: #{@summary.inspect}, po_box: #{@po_box.inspect}, type:"\ " #{@type.inspect}, street: #{@street.inspect}, city: #{@city.inspect}, region:"\ " #{@region.inspect}, postal_code: #{@postal_code.inspect}, international_details:"\ " #{@international_details.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
191 192 193 194 195 196 197 |
# File 'lib/the_plaid_api/models/kyc_check_address_summary.rb', line 191 def to_s class_name = self.class.name.split('::').last "<#{class_name} summary: #{@summary}, po_box: #{@po_box}, type: #{@type}, street:"\ " #{@street}, city: #{@city}, region: #{@region}, postal_code: #{@postal_code},"\ " international_details: #{@international_details}, additional_properties:"\ " #{@additional_properties}>" end |