Class: Cadenya::Models::Tenant

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/cadenya/models/tenant.rb,
sig/cadenya/models/tenant.rbs

Overview

See Also:

  • Cadenya::Resources::Tenants#retrieve

Defined Under Namespace

Modules: State

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(metadata:, state:, info: nil) ⇒ Object

Some parameter documentations has been truncated, see Cadenya::Models::Tenant for more details.

Tenant is the customer's organization as a readable record rather than an echo. It carries no spec: a tenant is never configured, only asserted, so everything about it lives in the metadata envelope — external_id is the key the customer asserted it under, name is the most recent name they asserted, and updated_at is therefore when the tenant was last asserted.

Parameters:



# File 'lib/cadenya/models/tenant.rb', line 27

Instance Attribute Details

#infoCadenya::Models::TenantInfo?

TenantInfo provides read-only server-derived data about a tenant.

Parameters:

Returns:



17
# File 'lib/cadenya/models/tenant.rb', line 17

optional :info, -> { Cadenya::TenantInfo }

#metadataCadenya::Models::ResourceMetadata

Standard metadata for persistent, named resources (e.g., agents, tools, prompts)



11
# File 'lib/cadenya/models/tenant.rb', line 11

required :metadata, -> { Cadenya::ResourceMetadata }

#stateCadenya::Models::Tenant::state

Returns the value of attribute state.

Returns:

  • (Cadenya::Models::Tenant::state)


17
18
19
# File 'sig/cadenya/models/tenant.rbs', line 17

def state
  @state
end

Instance Method Details

#to_hash{

Returns:

  • ({)


25
# File 'sig/cadenya/models/tenant.rbs', line 25

def to_hash: -> {