Class: Plaid::State
- Inherits:
-
Object
- Object
- Plaid::State
- Defined in:
- lib/plaid/models/state.rb
Overview
The state, or status, of the deposit switch. - ‘initialized` – The deposit switch has been initialized with the user entering the information required to submit the deposit switch request. - `processing` – The deposit switch request has been submitted and is being processed. - `completed` – The user’s employer has fulfilled the deposit switch request. - ‘error` – There was an error processing the deposit switch request.
Constant Summary collapse
- STATE =
[ # TODO: Write general description for INITIALIZED INITIALIZED = 'initialized'.freeze, # TODO: Write general description for PROCESSING PROCESSING = 'processing'.freeze, # TODO: Write general description for COMPLETED COMPLETED = 'completed'.freeze, # TODO: Write general description for ERROR ERROR = 'error'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = INITIALIZED) ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/plaid/models/state.rb', line 34 def self.from_value(value, default_value = INITIALIZED) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'initialized' then INITIALIZED when 'processing' then PROCESSING when 'completed' then COMPLETED when 'error' then ERROR else default_value end end |
.validate(value) ⇒ Object
28 29 30 31 32 |
# File 'lib/plaid/models/state.rb', line 28 def self.validate(value) return false if value.nil? true end |