Class: Plaid::Status2
- Inherits:
-
Object
- Object
- Plaid::Status2
- Defined in:
- lib/plaid/models/status2.rb
Overview
The status of the refund. ‘PROCESSING`: The refund is currently being processed. The refund will automatically exit this state when processing is complete. `INITIATED`: The refund has been successfully initiated. `EXECUTED`: Indicates that the refund has been successfully executed. `FAILED`: The refund has failed to be executed. This error is retryable once the root cause is resolved.
Constant Summary collapse
- STATUS2 =
[ # TODO: Write general description for PROCESSING PROCESSING = 'PROCESSING'.freeze, # TODO: Write general description for EXECUTED EXECUTED = 'EXECUTED'.freeze, # TODO: Write general description for INITIATED INITIATED = 'INITIATED'.freeze, # TODO: Write general description for FAILED FAILED = 'FAILED'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = PROCESSING) ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/plaid/models/status2.rb', line 34 def self.from_value(value, default_value = PROCESSING) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'processing' then PROCESSING when 'executed' then EXECUTED when 'initiated' then INITIATED when 'failed' then FAILED else default_value end end |
.validate(value) ⇒ Object
28 29 30 31 32 |
# File 'lib/plaid/models/status2.rb', line 28 def self.validate(value) return false if value.nil? true end |