Class: ThePlaidApi::PersonalFinanceCategoryVersion

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

Overview

Indicates which version of the personal finance category taxonomy is being used. [View PFCv2 and PFCv1 taxonomies](plaid.com/documents/pfc-taxonomy-all.csv). If you enabled Transactions or Enrich before December 2025 you will receive the ‘v1` taxonomy by default and may request `v2` by explicitly setting this field to `v2` in the request. If you enabled Transactions or Enrich on or after December 2025, you may only receive the `v2` taxonomy.

Constant Summary collapse

PERSONAL_FINANCE_CATEGORY_VERSION =
[
  # TODO: Write general description for V1
  V1 = 'v1'.freeze,

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

Class Method Summary collapse

Class Method Details

.from_value(value, default_value = V1) ⇒ Object



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

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

  str = value.to_s.strip

  case str.downcase
  when 'v1' then V1
  when 'v2' then V2
  else
    default_value
  end
end

.validate(value) ⇒ Object



23
24
25
26
27
# File 'lib/the_plaid_api/models/personal_finance_category_version.rb', line 23

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

  PERSONAL_FINANCE_CATEGORY_VERSION.include?(value)
end