Class: UnitOpenapiRubySdk::ThreadSoleProprietorshipTransactionVolume

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

Constant Summary collapse

LESS_THAN5_K =
"LessThan5K".freeze
BETWEEN5_K_AND20_K =
"Between5KAnd20K".freeze
BETWEEN20_K_AND75_K =
"Between20KAnd75K".freeze
BETWEEN75_K_AND150_K =
"Between75KAnd150K".freeze
BETWEEN150_K_AND300_K =
"Between150KAnd300K".freeze
GREATER_THAN300_K =
"GreaterThan300K".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all_varsObject



25
26
27
# File 'lib/unit_openapi_ruby_sdk/models/thread_sole_proprietorship_transaction_volume.rb', line 25

def self.all_vars
  @all_vars ||= [LESS_THAN5_K, BETWEEN5_K_AND20_K, BETWEEN20_K_AND75_K, BETWEEN75_K_AND150_K, BETWEEN150_K_AND300_K, GREATER_THAN300_K].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



32
33
34
# File 'lib/unit_openapi_ruby_sdk/models/thread_sole_proprietorship_transaction_volume.rb', line 32

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



39
40
41
42
# File 'lib/unit_openapi_ruby_sdk/models/thread_sole_proprietorship_transaction_volume.rb', line 39

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