Class: ThePlaidApi::BusinessKybCheck
- Defined in:
- lib/the_plaid_api/models/business_kyb_check.rb
Overview
Results from the KYB (Know Your Business) identity verification check
Instance Attribute Summary collapse
-
#address ⇒ BusinessFieldMatchSummary
Summary of how a specific business field matched against data provider results.
-
#match_details ⇒ BusinessKybMatchDetails
Detailed information about the business from data provider results.
-
#name ⇒ BusinessFieldMatchSummary
Summary of how a specific business field matched against data provider results.
-
#score ⇒ Integer
A score from 0 to 100 indicating the confidence in KYB (Know Your Business) identity assessment for the business.
-
#status ⇒ BusinessVerificationStatus
Status of the KYB (Know Your Business) identity assessment check.
-
#website ⇒ BusinessFieldMatchSummary
Summary of how a specific business field matched against data provider results.
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(status:, score:, name:, address:, website:, match_details:, additional_properties: nil) ⇒ BusinessKybCheck
constructor
A new instance of BusinessKybCheck.
-
#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(status:, score:, name:, address:, website:, match_details:, additional_properties: nil) ⇒ BusinessKybCheck
Returns a new instance of BusinessKybCheck.
64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/the_plaid_api/models/business_kyb_check.rb', line 64 def initialize(status:, score:, name:, address:, website:, match_details:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @status = status @score = score @name = name @address = address @website = website @match_details = match_details @additional_properties = additional_properties end |
Instance Attribute Details
#address ⇒ BusinessFieldMatchSummary
Summary of how a specific business field matched against data provider results
29 30 31 |
# File 'lib/the_plaid_api/models/business_kyb_check.rb', line 29 def address @address end |
#match_details ⇒ BusinessKybMatchDetails
Detailed information about the business from data provider results
38 39 40 |
# File 'lib/the_plaid_api/models/business_kyb_check.rb', line 38 def match_details @match_details end |
#name ⇒ BusinessFieldMatchSummary
Summary of how a specific business field matched against data provider results
24 25 26 |
# File 'lib/the_plaid_api/models/business_kyb_check.rb', line 24 def name @name end |
#score ⇒ Integer
A score from 0 to 100 indicating the confidence in KYB (Know Your Business) identity assessment for the business
19 20 21 |
# File 'lib/the_plaid_api/models/business_kyb_check.rb', line 19 def score @score end |
#status ⇒ BusinessVerificationStatus
Status of the KYB (Know Your Business) identity assessment check
14 15 16 |
# File 'lib/the_plaid_api/models/business_kyb_check.rb', line 14 def status @status end |
#website ⇒ BusinessFieldMatchSummary
Summary of how a specific business field matched against data provider results
34 35 36 |
# File 'lib/the_plaid_api/models/business_kyb_check.rb', line 34 def website @website end |
Class Method Details
.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 106 |
# File 'lib/the_plaid_api/models/business_kyb_check.rb', line 79 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. status = hash.key?('status') ? hash['status'] : nil score = hash.key?('score') ? hash['score'] : nil name = BusinessFieldMatchSummary.from_hash(hash['name']) if hash['name'] address = BusinessFieldMatchSummary.from_hash(hash['address']) if hash['address'] website = BusinessFieldMatchSummary.from_hash(hash['website']) if hash['website'] match_details = BusinessKybMatchDetails.from_hash(hash['match_details']) if hash['match_details'] # 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. BusinessKybCheck.new(status: status, score: score, name: name, address: address, website: website, match_details: match_details, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
41 42 43 44 45 46 47 48 49 50 |
# File 'lib/the_plaid_api/models/business_kyb_check.rb', line 41 def self.names @_hash = {} if @_hash.nil? @_hash['status'] = 'status' @_hash['score'] = 'score' @_hash['name'] = 'name' @_hash['address'] = 'address' @_hash['website'] = 'website' @_hash['match_details'] = 'match_details' @_hash end |
.nullables ⇒ Object
An array for nullable fields
58 59 60 61 62 |
# File 'lib/the_plaid_api/models/business_kyb_check.rb', line 58 def self.nullables %w[ match_details ] end |
.optionals ⇒ Object
An array for optional fields
53 54 55 |
# File 'lib/the_plaid_api/models/business_kyb_check.rb', line 53 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
117 118 119 120 121 122 123 |
# File 'lib/the_plaid_api/models/business_kyb_check.rb', line 117 def inspect class_name = self.class.name.split('::').last "<#{class_name} status: #{@status.inspect}, score: #{@score.inspect}, name:"\ " #{@name.inspect}, address: #{@address.inspect}, website: #{@website.inspect},"\ " match_details: #{@match_details.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
109 110 111 112 113 114 |
# File 'lib/the_plaid_api/models/business_kyb_check.rb', line 109 def to_s class_name = self.class.name.split('::').last "<#{class_name} status: #{@status}, score: #{@score}, name: #{@name}, address: #{@address},"\ " website: #{@website}, match_details: #{@match_details}, additional_properties:"\ " #{@additional_properties}>" end |