Class: ThePlaidApi::CraPartnerInsightsPrism
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::CraPartnerInsightsPrism
- Defined in:
- lib/the_plaid_api/models/cra_partner_insights_prism.rb
Overview
The Prism Data insights for the user.
Instance Attribute Summary collapse
-
#cash_score ⇒ PrismCashScore
The data from the CashScore® product returned by Prism Data.
-
#detect ⇒ PrismDetect
The data from the CashScore® Detect product returned by Prism Data.
-
#extend ⇒ PrismExtend
The data from the CashScore® Extend product returned by Prism Data.
-
#first_detect ⇒ PrismFirstDetect
The data from the FirstDetect product returned by Prism Data.
-
#insights ⇒ PrismInsights
The data from the Insights product returned by Prism Data.
-
#status ⇒ String
Details on whether the Prism Data attributes succeeded or failed to be generated.
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:, insights: SKIP, cash_score: SKIP, extend: SKIP, first_detect: SKIP, detect: SKIP, additional_properties: nil) ⇒ CraPartnerInsightsPrism
constructor
A new instance of CraPartnerInsightsPrism.
-
#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:, insights: SKIP, cash_score: SKIP, extend: SKIP, first_detect: SKIP, detect: SKIP, additional_properties: nil) ⇒ CraPartnerInsightsPrism
Returns a new instance of CraPartnerInsightsPrism.
71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/the_plaid_api/models/cra_partner_insights_prism.rb', line 71 def initialize(status:, insights: SKIP, cash_score: SKIP, extend: SKIP, first_detect: SKIP, detect: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @insights = insights unless insights == SKIP @cash_score = cash_score unless cash_score == SKIP @extend = extend unless extend == SKIP @first_detect = first_detect unless first_detect == SKIP @detect = detect unless detect == SKIP @status = status @additional_properties = additional_properties end |
Instance Attribute Details
#cash_score ⇒ PrismCashScore
The data from the CashScore® product returned by Prism Data.
18 19 20 |
# File 'lib/the_plaid_api/models/cra_partner_insights_prism.rb', line 18 def cash_score @cash_score end |
#detect ⇒ PrismDetect
The data from the CashScore® Detect product returned by Prism Data.
30 31 32 |
# File 'lib/the_plaid_api/models/cra_partner_insights_prism.rb', line 30 def detect @detect end |
#extend ⇒ PrismExtend
The data from the CashScore® Extend product returned by Prism Data.
22 23 24 |
# File 'lib/the_plaid_api/models/cra_partner_insights_prism.rb', line 22 def extend @extend end |
#first_detect ⇒ PrismFirstDetect
The data from the FirstDetect product returned by Prism Data.
26 27 28 |
# File 'lib/the_plaid_api/models/cra_partner_insights_prism.rb', line 26 def first_detect @first_detect end |
#insights ⇒ PrismInsights
The data from the Insights product returned by Prism Data.
14 15 16 |
# File 'lib/the_plaid_api/models/cra_partner_insights_prism.rb', line 14 def insights @insights end |
#status ⇒ String
Details on whether the Prism Data attributes succeeded or failed to be generated.
35 36 37 |
# File 'lib/the_plaid_api/models/cra_partner_insights_prism.rb', line 35 def status @status 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 |
# File 'lib/the_plaid_api/models/cra_partner_insights_prism.rb', line 86 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. status = hash.key?('status') ? hash['status'] : nil insights = PrismInsights.from_hash(hash['insights']) if hash['insights'] cash_score = PrismCashScore.from_hash(hash['cash_score']) if hash['cash_score'] extend = PrismExtend.from_hash(hash['extend']) if hash['extend'] first_detect = PrismFirstDetect.from_hash(hash['first_detect']) if hash['first_detect'] detect = PrismDetect.from_hash(hash['detect']) if hash['detect'] # 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. CraPartnerInsightsPrism.new(status: status, insights: insights, cash_score: cash_score, extend: extend, first_detect: first_detect, detect: detect, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/the_plaid_api/models/cra_partner_insights_prism.rb', line 38 def self.names @_hash = {} if @_hash.nil? @_hash['insights'] = 'insights' @_hash['cash_score'] = 'cash_score' @_hash['extend'] = 'extend' @_hash['first_detect'] = 'first_detect' @_hash['detect'] = 'detect' @_hash['status'] = 'status' @_hash end |
.nullables ⇒ Object
An array for nullable fields
61 62 63 64 65 66 67 68 69 |
# File 'lib/the_plaid_api/models/cra_partner_insights_prism.rb', line 61 def self.nullables %w[ insights cash_score extend first_detect detect ] end |
.optionals ⇒ Object
An array for optional fields
50 51 52 53 54 55 56 57 58 |
# File 'lib/the_plaid_api/models/cra_partner_insights_prism.rb', line 50 def self.optionals %w[ insights cash_score extend first_detect detect ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
123 124 125 126 127 128 |
# File 'lib/the_plaid_api/models/cra_partner_insights_prism.rb', line 123 def inspect class_name = self.class.name.split('::').last "<#{class_name} insights: #{@insights.inspect}, cash_score: #{@cash_score.inspect}, extend:"\ " #{@extend.inspect}, first_detect: #{@first_detect.inspect}, detect: #{@detect.inspect},"\ " status: #{@status.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
115 116 117 118 119 120 |
# File 'lib/the_plaid_api/models/cra_partner_insights_prism.rb', line 115 def to_s class_name = self.class.name.split('::').last "<#{class_name} insights: #{@insights}, cash_score: #{@cash_score}, extend: #{@extend},"\ " first_detect: #{@first_detect}, detect: #{@detect}, status: #{@status},"\ " additional_properties: #{@additional_properties}>" end |