Class: ThePlaidApi::TransactionsUpdateStatus
- Inherits:
-
Object
- Object
- ThePlaidApi::TransactionsUpdateStatus
- Defined in:
- lib/the_plaid_api/models/transactions_update_status.rb
Overview
A description of the update status for transaction pulls of an Item. This field contains the same information provided by transactions webhooks, and may be helpful for webhook troubleshooting or when recovering from missed webhooks. ‘TRANSACTIONS_UPDATE_STATUS_UNKNOWN`: Unable to fetch transactions update status for Item. `NOT_READY`: The Item is pending transaction pull. `INITIAL_UPDATE_COMPLETE`: Initial pull for the Item is complete, historical pull is pending. `HISTORICAL_UPDATE_COMPLETE`: Both initial and historical pull for Item are complete.
Constant Summary collapse
- TRANSACTIONS_UPDATE_STATUS =
[ # TODO: Write general description for TRANSACTIONS_UPDATE_STATUS_UNKNOWN TRANSACTIONS_UPDATE_STATUS_UNKNOWN = 'TRANSACTIONS_UPDATE_STATUS_UNKNOWN'.freeze, # TODO: Write general description for NOT_READY NOT_READY = 'NOT_READY'.freeze, # TODO: Write general description for INITIAL_UPDATE_COMPLETE INITIAL_UPDATE_COMPLETE = 'INITIAL_UPDATE_COMPLETE'.freeze, # TODO: Write general description for HISTORICAL_UPDATE_COMPLETE HISTORICAL_UPDATE_COMPLETE = 'HISTORICAL_UPDATE_COMPLETE'.freeze ].freeze
Class Method Summary collapse
- .from_value(value, default_value = TRANSACTIONS_UPDATE_STATUS_UNKNOWN) ⇒ Object
- .validate(value) ⇒ Object
Class Method Details
.from_value(value, default_value = TRANSACTIONS_UPDATE_STATUS_UNKNOWN) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/the_plaid_api/models/transactions_update_status.rb', line 36 def self.from_value(value, default_value = TRANSACTIONS_UPDATE_STATUS_UNKNOWN) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'transactions_update_status_unknown' then TRANSACTIONS_UPDATE_STATUS_UNKNOWN when 'not_ready' then NOT_READY when 'initial_update_complete' then INITIAL_UPDATE_COMPLETE when 'historical_update_complete' then HISTORICAL_UPDATE_COMPLETE else default_value end end |
.validate(value) ⇒ Object
30 31 32 33 34 |
# File 'lib/the_plaid_api/models/transactions_update_status.rb', line 30 def self.validate(value) return false if value.nil? TRANSACTIONS_UPDATE_STATUS.include?(value) end |