Class: Lithic::Models::AuthRules::AuthRule::DraftVersion

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/lithic/models/auth_rules/auth_rule.rb,
sig/lithic/models/auth_rules/auth_rule.rbs

Overview

See Also:

  • Lithic::Models::AuthRules::AuthRule#draft_version

Defined Under Namespace

Modules: Parameters, State

Instance Attribute Summary collapse

Class Method 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(error:, parameters:, state:, version:) ⇒ Object

Some parameter documentations has been truncated, see Lithic::Models::AuthRules::AuthRule::DraftVersion for more details.



# File 'lib/lithic/models/auth_rules/auth_rule.rb', line 244

Instance Attribute Details

#errorString?

An error message if the draft version failed compilation. Populated when state is ERROR, null otherwise.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


212
# File 'lib/lithic/models/auth_rules/auth_rule.rb', line 212

required :error, String, nil?: true

#stateSymbol, Lithic::Models::AuthRules::AuthRule::DraftVersion::State

The state of the draft version. Most rules are created synchronously and the state is immediately SHADOWING. Rules backed by TypeScript code are compiled asynchronously — the state starts as PENDING and transitions to SHADOWING on success or ERROR on failure.

  • PENDING: Compilation of the rule is in progress (TypeScript rules only).
  • SHADOWING: The draft version is ready and evaluating in shadow mode alongside the current active version. It can be promoted to the active version.
  • ERROR: Compilation of the rule failed. Check the error field for details.

Parameters:

  • value (Lithic::Models::AuthRules::AuthRule::DraftVersion::state)

Returns:



233
# File 'lib/lithic/models/auth_rules/auth_rule.rb', line 233

required :state, enum: -> { Lithic::AuthRules::AuthRule::DraftVersion::State }

#versionInteger

Returns the value of attribute version.

Returns:

  • (Integer)


156
157
158
# File 'sig/lithic/models/auth_rules/auth_rule.rbs', line 156

def version
  @version
end

Instance Method Details

#to_hash{

Returns:

  • ({)


165
# File 'sig/lithic/models/auth_rules/auth_rule.rbs', line 165

def to_hash: -> {