Class: Knockapi::Models::Condition

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/knockapi/models/condition.rb

Defined Under Namespace

Modules: Operator

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(argument:, operator:, variable:) ⇒ Object

A condition to be evaluated.

Parameters:

  • argument (String, nil)

    The argument value to compare against in the condition.

  • operator (Symbol, Knockapi::Models::Condition::Operator)

    The operator to use in the condition evaluation.

  • variable (String)

    The variable to be evaluated in the condition.



# File 'lib/knockapi/models/condition.rb', line 24

Instance Attribute Details

#argumentString?

The argument value to compare against in the condition.

Returns:

  • (String, nil)


10
# File 'lib/knockapi/models/condition.rb', line 10

required :argument, String, nil?: true

#operatorSymbol, Knockapi::Models::Condition::Operator

The operator to use in the condition evaluation.



16
# File 'lib/knockapi/models/condition.rb', line 16

required :operator, enum: -> { Knockapi::Condition::Operator }

#variableString

The variable to be evaluated in the condition.

Returns:

  • (String)


22
# File 'lib/knockapi/models/condition.rb', line 22

required :variable, String