Class: ThePlaidApi::PrismVersions

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

Overview

The versions of Prism products to evaluate

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(firstdetect: SKIP, detect: SKIP, cashscore: SKIP, extend: SKIP, insights: SKIP, additional_properties: nil) ⇒ PrismVersions

Returns a new instance of PrismVersions.



65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/the_plaid_api/models/prism_versions.rb', line 65

def initialize(firstdetect: SKIP, detect: SKIP, cashscore: SKIP,
               extend: SKIP, insights: SKIP, additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @firstdetect = firstdetect unless firstdetect == SKIP
  @detect = detect unless detect == SKIP
  @cashscore = cashscore unless cashscore == SKIP
  @extend = extend unless extend == SKIP
  @insights = insights unless insights == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#cashscorePrismCashScoreVersion

The version of Prism CashScore. If not specified, will default to v3.



22
23
24
# File 'lib/the_plaid_api/models/prism_versions.rb', line 22

def cashscore
  @cashscore
end

#detectPrismDetectVersion

The version of Prism Detect

Returns:



18
19
20
# File 'lib/the_plaid_api/models/prism_versions.rb', line 18

def detect
  @detect
end

#extendPrismExtendVersion

The version of Prism Extend

Returns:



26
27
28
# File 'lib/the_plaid_api/models/prism_versions.rb', line 26

def extend
  @extend
end

#firstdetectPrismFirstDetectVersion

The version of Prism FirstDetect. If not specified, will default to v3.



14
15
16
# File 'lib/the_plaid_api/models/prism_versions.rb', line 14

def firstdetect
  @firstdetect
end

#insightsPrismInsightsVersion

The version of Prism Insights. If not specified, will default to v3.



30
31
32
# File 'lib/the_plaid_api/models/prism_versions.rb', line 30

def insights
  @insights
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'lib/the_plaid_api/models/prism_versions.rb', line 79

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  firstdetect = hash.key?('firstdetect') ? hash['firstdetect'] : SKIP
  detect = hash.key?('detect') ? hash['detect'] : SKIP
  cashscore = hash.key?('cashscore') ? hash['cashscore'] : SKIP
  extend = hash.key?('extend') ? hash['extend'] : SKIP
  insights = hash.key?('insights') ? hash['insights'] : SKIP

  # 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.
  PrismVersions.new(firstdetect: firstdetect,
                    detect: detect,
                    cashscore: cashscore,
                    extend: extend,
                    insights: insights,
                    additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



33
34
35
36
37
38
39
40
41
# File 'lib/the_plaid_api/models/prism_versions.rb', line 33

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['firstdetect'] = 'firstdetect'
  @_hash['detect'] = 'detect'
  @_hash['cashscore'] = 'cashscore'
  @_hash['extend'] = 'extend'
  @_hash['insights'] = 'insights'
  @_hash
end

.nullablesObject

An array for nullable fields



55
56
57
58
59
60
61
62
63
# File 'lib/the_plaid_api/models/prism_versions.rb', line 55

def self.nullables
  %w[
    firstdetect
    detect
    cashscore
    extend
    insights
  ]
end

.optionalsObject

An array for optional fields



44
45
46
47
48
49
50
51
52
# File 'lib/the_plaid_api/models/prism_versions.rb', line 44

def self.optionals
  %w[
    firstdetect
    detect
    cashscore
    extend
    insights
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



114
115
116
117
118
119
# File 'lib/the_plaid_api/models/prism_versions.rb', line 114

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} firstdetect: #{@firstdetect.inspect}, detect: #{@detect.inspect},"\
  " cashscore: #{@cashscore.inspect}, extend: #{@extend.inspect}, insights:"\
  " #{@insights.inspect}, additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



106
107
108
109
110
111
# File 'lib/the_plaid_api/models/prism_versions.rb', line 106

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} firstdetect: #{@firstdetect}, detect: #{@detect}, cashscore: #{@cashscore},"\
  " extend: #{@extend}, insights: #{@insights}, additional_properties:"\
  " #{@additional_properties}>"
end