Class: UnitOpenapiRubySdk::ThreadIndividualSourceOfFunds

Inherits:
Object
  • Object
show all
Defined in:
lib/unit_openapi_ruby_sdk/models/thread_individual_source_of_funds.rb

Constant Summary collapse

SALARY_OR_WAGES =
"SalaryOrWages".freeze
BUSINESS_INCOME =
"BusinessIncome".freeze
INVESTMENT_INCOME =
"InvestmentIncome".freeze
RETIREMENT_SAVINGS =
"RetirementSavings".freeze
INHERITANCE =
"Inheritance".freeze
GIFT =
"Gift".freeze
SALE_OF_ASSETS =
"SaleOfAssets".freeze
"LegalSettlement".freeze
LOAN_PROCEEDS =
"LoanProceeds".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all_varsObject



28
29
30
# File 'lib/unit_openapi_ruby_sdk/models/thread_individual_source_of_funds.rb', line 28

def self.all_vars
  @all_vars ||= [SALARY_OR_WAGES, BUSINESS_INCOME, INVESTMENT_INCOME, RETIREMENT_SAVINGS, INHERITANCE, GIFT, SALE_OF_ASSETS, LEGAL_SETTLEMENT, LOAN_PROCEEDS].freeze
end

.build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



35
36
37
# File 'lib/unit_openapi_ruby_sdk/models/thread_individual_source_of_funds.rb', line 35

def self.build_from_hash(value)
  new.build_from_hash(value)
end

Instance Method Details

#build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



42
43
44
45
# File 'lib/unit_openapi_ruby_sdk/models/thread_individual_source_of_funds.rb', line 42

def build_from_hash(value)
  return value if ThreadIndividualSourceOfFunds.all_vars.include?(value)
  raise "Invalid ENUM value #{value} for class #ThreadIndividualSourceOfFunds"
end