Class: ThePlaidApi::BusinessDigitalPresenceCheck
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::BusinessDigitalPresenceCheck
- Defined in:
- lib/the_plaid_api/models/business_digital_presence_check.rb
Overview
Results from the digital presence check.
Instance Attribute Summary collapse
-
#address ⇒ BusinessFieldMatchSummary
Summary of how a specific business field matched against data provider results.
-
#email_address ⇒ BusinessFieldMatchSummary
Summary of how a specific business field matched against data provider results.
-
#phone_number ⇒ BusinessFieldMatchSummary
Summary of how a specific business field matched against data provider results.
-
#score ⇒ Integer
A score from 0 to 100 indicating digital presence confidence.
-
#status ⇒ BusinessVerificationStatus3
Status of the digital presence check.
-
#website ⇒ BusinessFieldMatchSummary
Summary of how a specific business field matched against data provider results.
-
#website_analysis ⇒ BusinessWebsiteAnalysis
Website analysis details if a website is found for the provided website in the search terms.
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:, address:, phone_number:, email_address:, website:, website_analysis:, additional_properties: nil) ⇒ BusinessDigitalPresenceCheck
constructor
A new instance of BusinessDigitalPresenceCheck.
-
#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:, address:, phone_number:, email_address:, website:, website_analysis:, additional_properties: nil) ⇒ BusinessDigitalPresenceCheck
Returns a new instance of BusinessDigitalPresenceCheck.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/the_plaid_api/models/business_digital_presence_check.rb', line 70 def initialize(status:, score:, address:, phone_number:, email_address:, website:, website_analysis:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @status = status @score = score @address = address @phone_number = phone_number @email_address = email_address @website = website @website_analysis = website_analysis @additional_properties = additional_properties end |
Instance Attribute Details
#address ⇒ BusinessFieldMatchSummary
Summary of how a specific business field matched against data provider results
23 24 25 |
# File 'lib/the_plaid_api/models/business_digital_presence_check.rb', line 23 def address @address end |
#email_address ⇒ BusinessFieldMatchSummary
Summary of how a specific business field matched against data provider results
33 34 35 |
# File 'lib/the_plaid_api/models/business_digital_presence_check.rb', line 33 def email_address @email_address end |
#phone_number ⇒ BusinessFieldMatchSummary
Summary of how a specific business field matched against data provider results
28 29 30 |
# File 'lib/the_plaid_api/models/business_digital_presence_check.rb', line 28 def phone_number @phone_number end |
#score ⇒ Integer
A score from 0 to 100 indicating digital presence confidence.
18 19 20 |
# File 'lib/the_plaid_api/models/business_digital_presence_check.rb', line 18 def score @score end |
#status ⇒ BusinessVerificationStatus3
Status of the digital presence check
14 15 16 |
# File 'lib/the_plaid_api/models/business_digital_presence_check.rb', line 14 def status @status end |
#website ⇒ BusinessFieldMatchSummary
Summary of how a specific business field matched against data provider results
38 39 40 |
# File 'lib/the_plaid_api/models/business_digital_presence_check.rb', line 38 def website @website end |
#website_analysis ⇒ BusinessWebsiteAnalysis
Website analysis details if a website is found for the provided website in the search terms.
43 44 45 |
# File 'lib/the_plaid_api/models/business_digital_presence_check.rb', line 43 def website_analysis @website_analysis end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/the_plaid_api/models/business_digital_presence_check.rb', line 86 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 address = BusinessFieldMatchSummary.from_hash(hash['address']) if hash['address'] phone_number = BusinessFieldMatchSummary.from_hash(hash['phone_number']) if hash['phone_number'] email_address = BusinessFieldMatchSummary.from_hash(hash['email_address']) if hash['email_address'] website = BusinessFieldMatchSummary.from_hash(hash['website']) if hash['website'] website_analysis = BusinessWebsiteAnalysis.from_hash(hash['website_analysis']) if hash['website_analysis'] # 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. BusinessDigitalPresenceCheck.new(status: status, score: score, address: address, phone_number: phone_number, email_address: email_address, website: website, website_analysis: website_analysis, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/the_plaid_api/models/business_digital_presence_check.rb', line 46 def self.names @_hash = {} if @_hash.nil? @_hash['status'] = 'status' @_hash['score'] = 'score' @_hash['address'] = 'address' @_hash['phone_number'] = 'phone_number' @_hash['email_address'] = 'email_address' @_hash['website'] = 'website' @_hash['website_analysis'] = 'website_analysis' @_hash end |
.nullables ⇒ Object
An array for nullable fields
64 65 66 67 68 |
# File 'lib/the_plaid_api/models/business_digital_presence_check.rb', line 64 def self.nullables %w[ website_analysis ] end |
.optionals ⇒ Object
An array for optional fields
59 60 61 |
# File 'lib/the_plaid_api/models/business_digital_presence_check.rb', line 59 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
128 129 130 131 132 133 134 |
# File 'lib/the_plaid_api/models/business_digital_presence_check.rb', line 128 def inspect class_name = self.class.name.split('::').last "<#{class_name} status: #{@status.inspect}, score: #{@score.inspect}, address:"\ " #{@address.inspect}, phone_number: #{@phone_number.inspect}, email_address:"\ " #{@email_address.inspect}, website: #{@website.inspect}, website_analysis:"\ " #{@website_analysis.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
120 121 122 123 124 125 |
# File 'lib/the_plaid_api/models/business_digital_presence_check.rb', line 120 def to_s class_name = self.class.name.split('::').last "<#{class_name} status: #{@status}, score: #{@score}, address: #{@address}, phone_number:"\ " #{@phone_number}, email_address: #{@email_address}, website: #{@website},"\ " website_analysis: #{@website_analysis}, additional_properties: #{@additional_properties}>" end |