Class: ThePlaidApi::BusinessWebsiteAnalysis

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

Overview

Website analysis details if a website is found for the provided website in the search terms.

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(is_parked:, email_is_deliverable:, website_build_status:, whois_record:, ssl:, additional_properties: nil) ⇒ BusinessWebsiteAnalysis

Returns a new instance of BusinessWebsiteAnalysis.



56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/the_plaid_api/models/business_website_analysis.rb', line 56

def initialize(is_parked:, email_is_deliverable:, website_build_status:,
               whois_record:, ssl:, additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @is_parked = is_parked
  @email_is_deliverable = email_is_deliverable
  @website_build_status = website_build_status
  @whois_record = whois_record
  @ssl = ssl
  @additional_properties = additional_properties
end

Instance Attribute Details

#email_is_deliverableBusinessCheckBooleanStatus

Tri-state boolean status, where ‘no_data` indicates the check could not determine a value.



21
22
23
# File 'lib/the_plaid_api/models/business_website_analysis.rb', line 21

def email_is_deliverable
  @email_is_deliverable
end

#is_parkedBusinessCheckBooleanStatus

Tri-state boolean status, where ‘no_data` indicates the check could not determine a value.



16
17
18
# File 'lib/the_plaid_api/models/business_website_analysis.rb', line 16

def is_parked
  @is_parked
end

#sslBusinessWebsiteSsl

SSL status for the business website.

Returns:



33
34
35
# File 'lib/the_plaid_api/models/business_website_analysis.rb', line 33

def ssl
  @ssl
end

#website_build_statusBusinessWebsiteBuildStatus

Build status of the business website.



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

def website_build_status
  @website_build_status
end

#whois_recordBusinessWhoisRecord

WHOIS metadata for the business website domain.

Returns:



29
30
31
# File 'lib/the_plaid_api/models/business_website_analysis.rb', line 29

def whois_record
  @whois_record
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
89
90
91
92
93
94
95
96
# File 'lib/the_plaid_api/models/business_website_analysis.rb', line 70

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  is_parked = hash.key?('is_parked') ? hash['is_parked'] : nil
  email_is_deliverable =
    hash.key?('email_is_deliverable') ? hash['email_is_deliverable'] : nil
  website_build_status =
    hash.key?('website_build_status') ? hash['website_build_status'] : nil
  whois_record = BusinessWhoisRecord.from_hash(hash['whois_record']) if hash['whois_record']
  ssl = BusinessWebsiteSsl.from_hash(hash['ssl']) if hash['ssl']

  # 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.
  BusinessWebsiteAnalysis.new(is_parked: is_parked,
                              email_is_deliverable: email_is_deliverable,
                              website_build_status: website_build_status,
                              whois_record: whois_record,
                              ssl: ssl,
                              additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



36
37
38
39
40
41
42
43
44
# File 'lib/the_plaid_api/models/business_website_analysis.rb', line 36

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['is_parked'] = 'is_parked'
  @_hash['email_is_deliverable'] = 'email_is_deliverable'
  @_hash['website_build_status'] = 'website_build_status'
  @_hash['whois_record'] = 'whois_record'
  @_hash['ssl'] = 'ssl'
  @_hash
end

.nullablesObject

An array for nullable fields



52
53
54
# File 'lib/the_plaid_api/models/business_website_analysis.rb', line 52

def self.nullables
  []
end

.optionalsObject

An array for optional fields



47
48
49
# File 'lib/the_plaid_api/models/business_website_analysis.rb', line 47

def self.optionals
  []
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



107
108
109
110
111
112
113
# File 'lib/the_plaid_api/models/business_website_analysis.rb', line 107

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} is_parked: #{@is_parked.inspect}, email_is_deliverable:"\
  " #{@email_is_deliverable.inspect}, website_build_status: #{@website_build_status.inspect},"\
  " whois_record: #{@whois_record.inspect}, ssl: #{@ssl.inspect}, additional_properties:"\
  " #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



99
100
101
102
103
104
# File 'lib/the_plaid_api/models/business_website_analysis.rb', line 99

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} is_parked: #{@is_parked}, email_is_deliverable: #{@email_is_deliverable},"\
  " website_build_status: #{@website_build_status}, whois_record: #{@whois_record}, ssl:"\
  " #{@ssl}, additional_properties: #{@additional_properties}>"
end