Class: ThePlaidApi::LimitedPurposeType

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

Overview

A limited purpose type identifying the specific use case for limited purpose checking accounts.

Constant Summary collapse

LIMITED_PURPOSE_TYPE =
[
  # TODO: Write general description for RENT_MORTGAGE
  RENT_MORTGAGE = 'RENT_MORTGAGE'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.from_value(value, default_value = RENT_MORTGAGE) ⇒ Object



21
22
23
24
25
# File 'lib/the_plaid_api/models/limited_purpose_type.rb', line 21

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

  default_value
end

.validate(value) ⇒ Object



15
16
17
18
19
# File 'lib/the_plaid_api/models/limited_purpose_type.rb', line 15

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

  LIMITED_PURPOSE_TYPE.include?(value)
end