Class: ThePlaidApi::RefreshInterval
- Inherits:
-
Object
- Object
- ThePlaidApi::RefreshInterval
- Defined in:
- lib/the_plaid_api/models/refresh_interval.rb
Overview
How frequently data for subscription products like Investments, Transactions, and Liabilities, is being refreshed, relative to the institution’s normal scheduling. The ‘refresh_interval` may be `DELAYED` or `STOPPED` even when the success rate is high.
Constant Summary collapse
- REFRESH_INTERVAL =
[ # TODO: Write general description for NORMAL NORMAL = 'NORMAL'.freeze, # TODO: Write general description for DELAYED DELAYED = 'DELAYED'.freeze, # TODO: Write general description for STOPPED STOPPED = 'STOPPED'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = NORMAL) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/the_plaid_api/models/refresh_interval.rb', line 29 def self.from_value(value, default_value = NORMAL) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'normal' then NORMAL when 'delayed' then DELAYED when 'stopped' then STOPPED else default_value end end |
.validate(value) ⇒ Object
23 24 25 26 27 |
# File 'lib/the_plaid_api/models/refresh_interval.rb', line 23 def self.validate(value) return false if value.nil? REFRESH_INTERVAL.include?(value) end |