Class: ThePlaidApi::KycCheckPhoneSummary

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

Overview

Result summary object specifying how the ‘phone` field matched.

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(summary:, area_code:, additional_properties: nil) ⇒ KycCheckPhoneSummary

Returns a new instance of KycCheckPhoneSummary.



60
61
62
63
64
65
66
67
# File 'lib/the_plaid_api/models/kyc_check_phone_summary.rb', line 60

def initialize(summary:, area_code:, additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @summary = summary
  @area_code = area_code
  @additional_properties = additional_properties
end

Instance Attribute Details

#area_codeMatchSummaryCode1

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:



40
41
42
# File 'lib/the_plaid_api/models/kyc_check_phone_summary.rb', line 40

def area_code
  @area_code
end

#summaryMatchSummaryCode1

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:



25
26
27
# File 'lib/the_plaid_api/models/kyc_check_phone_summary.rb', line 25

def summary
  @summary
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/the_plaid_api/models/kyc_check_phone_summary.rb', line 70

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  summary = hash.key?('summary') ? hash['summary'] : nil
  area_code = hash.key?('area_code') ? hash['area_code'] : 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.
  KycCheckPhoneSummary.new(summary: summary,
                           area_code: area_code,
                           additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



43
44
45
46
47
48
# File 'lib/the_plaid_api/models/kyc_check_phone_summary.rb', line 43

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['summary'] = 'summary'
  @_hash['area_code'] = 'area_code'
  @_hash
end

.nullablesObject

An array for nullable fields



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

def self.nullables
  []
end

.optionalsObject

An array for optional fields



51
52
53
# File 'lib/the_plaid_api/models/kyc_check_phone_summary.rb', line 51

def self.optionals
  []
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



98
99
100
101
102
# File 'lib/the_plaid_api/models/kyc_check_phone_summary.rb', line 98

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} summary: #{@summary.inspect}, area_code: #{@area_code.inspect},"\
  " additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



91
92
93
94
95
# File 'lib/the_plaid_api/models/kyc_check_phone_summary.rb', line 91

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} summary: #{@summary}, area_code: #{@area_code}, additional_properties:"\
  " #{@additional_properties}>"
end