Class: ThePlaidApi::PartnerEndCustomerStatus

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

Overview

The status of the given end customer. ‘UNDER_REVIEW`: The end customer has been created and enabled in the Sandbox environment. The end customer must be manually reviewed by the Plaid team before it can be enabled in Production, at which point its status will automatically transition to `PENDING_ENABLEMENT` or `DENIED`. `PENDING_ENABLEMENT`: The end customer is ready to be fully enabled in the Production environment. Call the `/partner/customer/enable` endpoint to enable the end customer in full Production. `ACTIVE`: The end customer has been fully enabled in all environments. `DENIED`: The end customer has been created and enabled in the Sandbox environment, but it did not pass review by the Plaid team and therefore cannot be enabled for Production access. Talk to your Account Manager for more information.

Constant Summary collapse

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

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

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

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

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

Class Method Summary collapse

Class Method Details

.from_value(value, default_value = UNDER_REVIEW) ⇒ Object



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/the_plaid_api/models/partner_end_customer_status.rb', line 43

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

  str = value.to_s.strip

  case str.downcase
  when 'under_review' then UNDER_REVIEW
  when 'pending_enablement' then PENDING_ENABLEMENT
  when 'active' then ACTIVE
  when 'denied' then DENIED
  when 'more_information_needed' then MORE_INFORMATION_NEEDED
  else
    default_value
  end
end

.validate(value) ⇒ Object



37
38
39
40
41
# File 'lib/the_plaid_api/models/partner_end_customer_status.rb', line 37

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

  PARTNER_END_CUSTOMER_STATUS.include?(value)
end