Class: ThePlaidApi::FdxEventStatus
- Inherits:
-
Object
- Object
- ThePlaidApi::FdxEventStatus
- Defined in:
- lib/the_plaid_api/models/fdx_event_status.rb
Overview
Current status of indicated entity after reported event change. Not all statuses will be supported on all entity types by all data providers
Constant Summary collapse
- FDX_EVENT_STATUS =
[ # TODO: Write general description for ACTIVE ACTIVE = 'ACTIVE'.freeze, # TODO: Write general description for EXPIRED EXPIRED = 'EXPIRED'.freeze, # TODO: Write general description for REVOKED REVOKED = 'REVOKED'.freeze, # TODO: Write general description for SUSPENDED SUSPENDED = 'SUSPENDED'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = ACTIVE) ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/the_plaid_api/models/fdx_event_status.rb', line 30 def self.from_value(value, default_value = ACTIVE) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'active' then ACTIVE when 'expired' then EXPIRED when 'revoked' then REVOKED when 'suspended' then SUSPENDED else default_value end end |
.validate(value) ⇒ Object
24 25 26 27 28 |
# File 'lib/the_plaid_api/models/fdx_event_status.rb', line 24 def self.validate(value) return false if value.nil? FDX_EVENT_STATUS.include?(value) end |