Class: ThePlaidApi::BusinessRiskCheck
- Defined in:
- lib/the_plaid_api/models/business_risk_check.rb
Overview
Results from the business risk assessment check
Instance Attribute Summary collapse
-
#industry_prediction ⇒ BusinessIndustryPredictionNullable
Nullable industry prediction details.
-
#score ⇒ Integer
A score from 0 to 100 indicating the risk assessment for the business.
-
#status ⇒ BusinessVerificationStatus1
Status of the business risk assessment check.
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:, industry_prediction:, additional_properties: nil) ⇒ BusinessRiskCheck
constructor
A new instance of BusinessRiskCheck.
-
#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:, industry_prediction:, additional_properties: nil) ⇒ BusinessRiskCheck
Returns a new instance of BusinessRiskCheck.
45 46 47 48 49 50 51 52 53 54 |
# File 'lib/the_plaid_api/models/business_risk_check.rb', line 45 def initialize(status:, score:, industry_prediction:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @status = status @score = score @industry_prediction = industry_prediction @additional_properties = additional_properties end |
Instance Attribute Details
#industry_prediction ⇒ BusinessIndustryPredictionNullable
Nullable industry prediction details.
22 23 24 |
# File 'lib/the_plaid_api/models/business_risk_check.rb', line 22 def industry_prediction @industry_prediction end |
#score ⇒ Integer
A score from 0 to 100 indicating the risk assessment for the business
18 19 20 |
# File 'lib/the_plaid_api/models/business_risk_check.rb', line 18 def score @score end |
#status ⇒ BusinessVerificationStatus1
Status of the business risk assessment check
14 15 16 |
# File 'lib/the_plaid_api/models/business_risk_check.rb', line 14 def status @status end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/the_plaid_api/models/business_risk_check.rb', line 57 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 if hash['industry_prediction'] industry_prediction = BusinessIndustryPredictionNullable.from_hash(hash['industry_prediction']) 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. BusinessRiskCheck.new(status: status, score: score, industry_prediction: industry_prediction, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
25 26 27 28 29 30 31 |
# File 'lib/the_plaid_api/models/business_risk_check.rb', line 25 def self.names @_hash = {} if @_hash.nil? @_hash['status'] = 'status' @_hash['score'] = 'score' @_hash['industry_prediction'] = 'industry_prediction' @_hash end |
.nullables ⇒ Object
An array for nullable fields
39 40 41 42 43 |
# File 'lib/the_plaid_api/models/business_risk_check.rb', line 39 def self.nullables %w[ industry_prediction ] end |
.optionals ⇒ Object
An array for optional fields
34 35 36 |
# File 'lib/the_plaid_api/models/business_risk_check.rb', line 34 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
89 90 91 92 93 |
# File 'lib/the_plaid_api/models/business_risk_check.rb', line 89 def inspect class_name = self.class.name.split('::').last "<#{class_name} status: #{@status.inspect}, score: #{@score.inspect}, industry_prediction:"\ " #{@industry_prediction.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
82 83 84 85 86 |
# File 'lib/the_plaid_api/models/business_risk_check.rb', line 82 def to_s class_name = self.class.name.split('::').last "<#{class_name} status: #{@status}, score: #{@score}, industry_prediction:"\ " #{@industry_prediction}, additional_properties: #{@additional_properties}>" end |