Class: ThePlaidApi::BusinessEntityType
- Inherits:
-
Object
- Object
- ThePlaidApi::BusinessEntityType
- Defined in:
- lib/the_plaid_api/models/business_entity_type.rb
Overview
The legal structure or type of business entity
Constant Summary collapse
- BUSINESS_ENTITY_TYPE =
[ # TODO: Write general description for SOLE_PROPRIETORSHIP SOLE_PROPRIETORSHIP = 'sole_proprietorship'.freeze, # TODO: Write general description for GENERAL_PARTNERSHIP GENERAL_PARTNERSHIP = 'general_partnership'.freeze, # TODO: Write general description for LLC LLC = 'llc'.freeze, # TODO: Write general description for LLP LLP = 'llp'.freeze, # TODO: Write general description for LLLP LLLP = 'lllp'.freeze, # TODO: Write general description for LP LP = 'lp'.freeze, # TODO: Write general description for C_CORPORATION C_CORPORATION = 'c_corporation'.freeze, # TODO: Write general description for S_CORPORATION S_CORPORATION = 's_corporation'.freeze, # TODO: Write general description for B_CORPORATION B_CORPORATION = 'b_corporation'.freeze, # TODO: Write general description for NONPROFIT NONPROFIT = 'nonprofit'.freeze, # TODO: Write general description for COOPERATIVE COOPERATIVE = 'cooperative'.freeze, # TODO: Write general description for TRUST TRUST = 'trust'.freeze, # TODO: Write general description for PROFESSIONAL_ASSOCIATION PROFESSIONAL_ASSOCIATION = 'professional_association'.freeze, # TODO: Write general description for PROFESSIONAL_CORPORATION PROFESSIONAL_CORPORATION = 'professional_corporation'.freeze, # TODO: Write general description for TRADE_NAME TRADE_NAME = 'trade_name'.freeze, # TODO: Write general description for BANK BANK = 'bank'.freeze, # TODO: Write general description for CREDIT_UNION CREDIT_UNION = 'credit_union'.freeze, # TODO: Write general description for INSURANCE INSURANCE = 'insurance'.freeze, # TODO: Write general description for OTHER OTHER = 'other'.freeze, # TODO: Write general description for UNKNOWN UNKNOWN = 'unknown'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = SOLE_PROPRIETORSHIP) ⇒ Object
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/the_plaid_api/models/business_entity_type.rb', line 77 def self.from_value(value, default_value = SOLE_PROPRIETORSHIP) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'sole_proprietorship' then SOLE_PROPRIETORSHIP when 'general_partnership' then GENERAL_PARTNERSHIP when 'llc' then LLC when 'llp' then LLP when 'lllp' then LLLP when 'lp' then LP when 'c_corporation' then C_CORPORATION when 's_corporation' then S_CORPORATION when 'b_corporation' then B_CORPORATION when 'nonprofit' then NONPROFIT when 'cooperative' then COOPERATIVE when 'trust' then TRUST when 'professional_association' then PROFESSIONAL_ASSOCIATION when 'professional_corporation' then PROFESSIONAL_CORPORATION when 'trade_name' then TRADE_NAME when 'bank' then BANK when 'credit_union' then CREDIT_UNION when 'insurance' then INSURANCE when 'other' then OTHER when 'unknown' then UNKNOWN else default_value end end |
.validate(value) ⇒ Object
71 72 73 74 75 |
# File 'lib/the_plaid_api/models/business_entity_type.rb', line 71 def self.validate(value) return false if value.nil? BUSINESS_ENTITY_TYPE.include?(value) end |