Class: UnitOpenapiRubySdk::Industry

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

Constant Summary collapse

RETAIL =
"Retail".freeze
WHOLESALE =
"Wholesale".freeze
RESTAURANTS =
"Restaurants".freeze
HOSPITALS =
"Hospitals".freeze
CONSTRUCTION =
"Construction".freeze
INSURANCE =
"Insurance".freeze
UNIONS =
"Unions".freeze
REAL_ESTATE =
"RealEstate".freeze
FREELANCE_PROFESSIONAL =
"FreelanceProfessional".freeze
OTHER_PROFESSIONAL_SERVICES =
"OtherProfessionalServices".freeze
ONLINE_RETAILER =
"OnlineRetailer".freeze
OTHER_EDUCATION_SERVICES =
"OtherEducationServices".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all_varsObject



31
32
33
# File 'lib/unit_openapi_ruby_sdk/models/industry.rb', line 31

def self.all_vars
  @all_vars ||= [RETAIL, WHOLESALE, RESTAURANTS, HOSPITALS, CONSTRUCTION, INSURANCE, UNIONS, REAL_ESTATE, FREELANCE_PROFESSIONAL, OTHER_PROFESSIONAL_SERVICES, ONLINE_RETAILER, OTHER_EDUCATION_SERVICES].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



38
39
40
# File 'lib/unit_openapi_ruby_sdk/models/industry.rb', line 38

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



45
46
47
48
# File 'lib/unit_openapi_ruby_sdk/models/industry.rb', line 45

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