Class: FeratelCheckApiClient::ServiceUsageType

Inherits:
Object
  • Object
show all
Defined in:
lib/feratel-check-api-client/models/service_usage_type.rb

Constant Summary collapse

ANY =
"ANY".freeze
N_TIMES =
"N_TIMES".freeze
N_TIMES_FROM_DATE =
"N_TIMES_FROM_DATE".freeze
N_TIMES_ON_WEEKDAYS =
"N_TIMES_ON_WEEKDAYS".freeze
N_TIMES_BETWEEN_DATE =
"N_TIMES_BETWEEN_DATE".freeze
N_TIMES_IN_M_DAYS =
"N_TIMES_IN_M_DAYS".freeze
N_TIMES_PER_DAY =
"N_TIMES_PER_DAY".freeze
N_TIMES_WEEKLY =
"N_TIMES_WEEKLY".freeze
N_TIMES_MONTHLY =
"N_TIMES_MONTHLY".freeze
N_DAYS_FROM_FIRST_USE =
"N_DAYS_FROM_FIRST_USE".freeze
N_DAYS_FROM_DATE =
"N_DAYS_FROM_DATE".freeze
UNDEFINED =
"UNDEFINED".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all_varsObject



31
32
33
# File 'lib/feratel-check-api-client/models/service_usage_type.rb', line 31

def self.all_vars
  @all_vars ||= [ANY, N_TIMES, N_TIMES_FROM_DATE, N_TIMES_ON_WEEKDAYS, N_TIMES_BETWEEN_DATE, N_TIMES_IN_M_DAYS, N_TIMES_PER_DAY, N_TIMES_WEEKLY, N_TIMES_MONTHLY, N_DAYS_FROM_FIRST_USE, N_DAYS_FROM_DATE, UNDEFINED].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/feratel-check-api-client/models/service_usage_type.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/feratel-check-api-client/models/service_usage_type.rb', line 45

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