Class: ThePlaidApi::ServiceProductFulfillmentIdentifier

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

Overview

Documentation not found in the MISMO model viewer and not provided by Freddie Mac.

Constant Summary collapse

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

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

Class Method Summary collapse

Class Method Details

.from_value(value, default_value = VOA) ⇒ Object



24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/the_plaid_api/models/service_product_fulfillment_identifier.rb', line 24

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

  str = value.to_s.strip

  case str.downcase
  when 'voa' then VOA
  when 'voe' then VOE
  else
    default_value
  end
end

.validate(value) ⇒ Object



18
19
20
21
22
# File 'lib/the_plaid_api/models/service_product_fulfillment_identifier.rb', line 18

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

  SERVICE_PRODUCT_FULFILLMENT_IDENTIFIER.include?(value)
end