Class: ThePlaidApi::Status2

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

Overview

The point at which the user exited the Link flow. One of the following values.

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(requires_questions: SKIP, requires_selections: SKIP, requires_code: SKIP, choose_device: SKIP, requires_credentials: SKIP, requires_account_selection: SKIP, requires_oauth: SKIP, institution_not_found: SKIP, institution_not_supported: SKIP, additional_properties: nil) ⇒ Status2

Returns a new instance of Status2.



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
# File 'lib/the_plaid_api/models/status2.rb', line 87

def initialize(requires_questions: SKIP, requires_selections: SKIP,
               requires_code: SKIP, choose_device: SKIP,
               requires_credentials: SKIP, requires_account_selection: SKIP,
               requires_oauth: SKIP, institution_not_found: SKIP,
               institution_not_supported: SKIP, additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @requires_questions = requires_questions unless requires_questions == SKIP
  @requires_selections = requires_selections unless requires_selections == SKIP
  @requires_code = requires_code unless requires_code == SKIP
  @choose_device = choose_device unless choose_device == SKIP
  @requires_credentials = requires_credentials unless requires_credentials == SKIP
  unless  == SKIP
    @requires_account_selection =
      
  end
  @requires_oauth = requires_oauth unless requires_oauth == SKIP
  @institution_not_found = institution_not_found unless institution_not_found == SKIP
  unless institution_not_supported == SKIP
    @institution_not_supported =
      institution_not_supported
  end
  @additional_properties = additional_properties
end

Instance Attribute Details

#choose_deviceObject

User prompted to select a device on which to receive a one-time passcode

Returns:

  • (Object)


27
28
29
# File 'lib/the_plaid_api/models/status2.rb', line 27

def choose_device
  @choose_device
end

#institution_not_foundObject

User exited the Link flow after unsuccessfully (no results returned) searching for a financial institution

Returns:

  • (Object)


45
46
47
# File 'lib/the_plaid_api/models/status2.rb', line 45

def institution_not_found
  @institution_not_found
end

#institution_not_supportedObject

User exited the Link flow after discovering their selected institution is no longer supported by Plaid

Returns:

  • (Object)


50
51
52
# File 'lib/the_plaid_api/models/status2.rb', line 50

def institution_not_supported
  @institution_not_supported
end

#requires_account_selectionObject

User prompted to select one or more financial accounts to share

Returns:

  • (Object)


36
37
38
# File 'lib/the_plaid_api/models/status2.rb', line 36

def 
  @requires_account_selection
end

#requires_codeObject

User prompted to provide a one-time passcode

Returns:

  • (Object)


23
24
25
# File 'lib/the_plaid_api/models/status2.rb', line 23

def requires_code
  @requires_code
end

#requires_credentialsObject

User prompted to provide credentials for the selected financial institution or has not yet selected a financial institution

Returns:

  • (Object)


32
33
34
# File 'lib/the_plaid_api/models/status2.rb', line 32

def requires_credentials
  @requires_credentials
end

#requires_oauthObject

User prompted to enter an OAuth flow

Returns:

  • (Object)


40
41
42
# File 'lib/the_plaid_api/models/status2.rb', line 40

def requires_oauth
  @requires_oauth
end

#requires_questionsObject

User prompted to answer security questions

Returns:

  • (Object)


15
16
17
# File 'lib/the_plaid_api/models/status2.rb', line 15

def requires_questions
  @requires_questions
end

#requires_selectionsObject

User prompted to answer multiple choice question(s)

Returns:

  • (Object)


19
20
21
# File 'lib/the_plaid_api/models/status2.rb', line 19

def requires_selections
  @requires_selections
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# File 'lib/the_plaid_api/models/status2.rb', line 114

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  requires_questions =
    hash.key?('requires_questions') ? hash['requires_questions'] : SKIP
  requires_selections =
    hash.key?('requires_selections') ? hash['requires_selections'] : SKIP
  requires_code = hash.key?('requires_code') ? hash['requires_code'] : SKIP
  choose_device = hash.key?('choose_device') ? hash['choose_device'] : SKIP
  requires_credentials =
    hash.key?('requires_credentials') ? hash['requires_credentials'] : SKIP
   =
    hash.key?('requires_account_selection') ? hash['requires_account_selection'] : SKIP
  requires_oauth =
    hash.key?('requires_oauth') ? hash['requires_oauth'] : SKIP
  institution_not_found =
    hash.key?('institution_not_found') ? hash['institution_not_found'] : SKIP
  institution_not_supported =
    hash.key?('institution_not_supported') ? hash['institution_not_supported'] : 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.
  Status2.new(requires_questions: requires_questions,
              requires_selections: requires_selections,
              requires_code: requires_code,
              choose_device: choose_device,
              requires_credentials: requires_credentials,
              requires_account_selection: ,
              requires_oauth: requires_oauth,
              institution_not_found: institution_not_found,
              institution_not_supported: institution_not_supported,
              additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/the_plaid_api/models/status2.rb', line 53

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['requires_questions'] = 'requires_questions'
  @_hash['requires_selections'] = 'requires_selections'
  @_hash['requires_code'] = 'requires_code'
  @_hash['choose_device'] = 'choose_device'
  @_hash['requires_credentials'] = 'requires_credentials'
  @_hash['requires_account_selection'] = 'requires_account_selection'
  @_hash['requires_oauth'] = 'requires_oauth'
  @_hash['institution_not_found'] = 'institution_not_found'
  @_hash['institution_not_supported'] = 'institution_not_supported'
  @_hash
end

.nullablesObject

An array for nullable fields



83
84
85
# File 'lib/the_plaid_api/models/status2.rb', line 83

def self.nullables
  []
end

.optionalsObject

An array for optional fields



68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/the_plaid_api/models/status2.rb', line 68

def self.optionals
  %w[
    requires_questions
    requires_selections
    requires_code
    choose_device
    requires_credentials
    requires_account_selection
    requires_oauth
    institution_not_found
    institution_not_supported
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



168
169
170
171
172
173
174
175
176
177
# File 'lib/the_plaid_api/models/status2.rb', line 168

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} requires_questions: #{@requires_questions.inspect}, requires_selections:"\
  " #{@requires_selections.inspect}, requires_code: #{@requires_code.inspect}, choose_device:"\
  " #{@choose_device.inspect}, requires_credentials: #{@requires_credentials.inspect},"\
  " requires_account_selection: #{@requires_account_selection.inspect}, requires_oauth:"\
  " #{@requires_oauth.inspect}, institution_not_found: #{@institution_not_found.inspect},"\
  " institution_not_supported: #{@institution_not_supported.inspect}, additional_properties:"\
  " #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



156
157
158
159
160
161
162
163
164
165
# File 'lib/the_plaid_api/models/status2.rb', line 156

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} requires_questions: #{@requires_questions}, requires_selections:"\
  " #{@requires_selections}, requires_code: #{@requires_code}, choose_device:"\
  " #{@choose_device}, requires_credentials: #{@requires_credentials},"\
  " requires_account_selection: #{@requires_account_selection}, requires_oauth:"\
  " #{@requires_oauth}, institution_not_found: #{@institution_not_found},"\
  " institution_not_supported: #{@institution_not_supported}, additional_properties:"\
  " #{@additional_properties}>"
end