Class: ThePlaidApi::PartnerEndCustomerFlowdownStatus

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

Overview

The status of the addendum to the Plaid MSA (“flowdown”) for the end customer.

Constant Summary collapse

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

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

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

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

Class Method Summary collapse

Class Method Details

.from_value(value, default_value = NOT_STARTED) ⇒ Object



30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/the_plaid_api/models/partner_end_customer_flowdown_status.rb', line 30

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

  str = value.to_s.strip

  case str.downcase
  when 'not_started' then NOT_STARTED
  when 'in_review' then IN_REVIEW
  when 'negotiation' then NEGOTIATION
  when 'complete' then COMPLETE
  else
    default_value
  end
end

.validate(value) ⇒ Object



24
25
26
27
28
# File 'lib/the_plaid_api/models/partner_end_customer_flowdown_status.rb', line 24

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

  PARTNER_END_CUSTOMER_FLOWDOWN_STATUS.include?(value)
end