Class: ThePlaidApi::OwnershipType
- Inherits:
-
Object
- Object
- ThePlaidApi::OwnershipType
- Defined in:
- lib/the_plaid_api/models/ownership_type.rb
Overview
How an asset is owned. ‘association`: Ownership by a corporation, partnership, or unincorporated association, including for-profit and not-for-profit organizations. `individual`: Ownership by an individual. `joint`: Joint ownership by multiple parties. `trust`: Ownership by a revocable or irrevocable trust.
Constant Summary collapse
- OWNERSHIP_TYPE =
[ # TODO: Write general description for INDIVIDUAL INDIVIDUAL = 'individual'.freeze, # TODO: Write general description for JOINT JOINT = 'joint'.freeze, # TODO: Write general description for ASSOCIATION ASSOCIATION = 'association'.freeze, # TODO: Write general description for TRUST TRUST = 'trust'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = INDIVIDUAL) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/the_plaid_api/models/ownership_type.rb', line 33 def self.from_value(value, default_value = INDIVIDUAL) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'individual' then INDIVIDUAL when 'joint' then JOINT when 'association' then ASSOCIATION when 'trust' then TRUST else default_value end end |
.validate(value) ⇒ Object
27 28 29 30 31 |
# File 'lib/the_plaid_api/models/ownership_type.rb', line 27 def self.validate(value) return false if value.nil? OWNERSHIP_TYPE.include?(value) end |