Class: ThePlaidApi::LinkSessionSuccessMetadataTransferStatus

Inherits:
Object
  • Object
show all
Defined in:
lib/the_plaid_api/models/link_session_success_metadata_transfer_status.rb

Overview

The status of a transfer. Returned only when [Transfer UI](plaid.com/docs/transfer/using-transfer-ui) is implemented. - ‘COMPLETE` – The transfer was completed. - `INCOMPLETE` – The transfer could not be completed. For help, see [Troubleshooting transfers](plaid.com/docs/transfer/using-transfer-ui/#troubleshootin g-transfer-ui).

Constant Summary collapse

[
  # TODO: Write general description for COMPLETE
  COMPLETE = 'COMPLETE'.freeze,

  # TODO: Write general description for INCOMPLETE
  INCOMPLETE = 'INCOMPLETE'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.from_value(value, default_value = COMPLETE) ⇒ Object



28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/the_plaid_api/models/link_session_success_metadata_transfer_status.rb', line 28

def self.from_value(value, default_value = COMPLETE)
  return default_value if value.nil?

  str = value.to_s.strip

  case str.downcase
  when 'complete' then COMPLETE
  when 'incomplete' then INCOMPLETE
  else
    default_value
  end
end

.validate(value) ⇒ Object



22
23
24
25
26
# File 'lib/the_plaid_api/models/link_session_success_metadata_transfer_status.rb', line 22

def self.validate(value)
  return false if value.nil?

  LINK_SESSION_SUCCESS_METADATA_TRANSFER_STATUS.include?(value)
end