Class: Cadenya::Models::TenantReference

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

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(id:, external_id:, name: nil) ⇒ TenantReference

TenantReference is the read-only echo of a resource's tenant association, carrying both Cadenya's canonical id and the customer's own key.

Parameters:

  • id (String)

    Cadenya's canonical tenant id.

  • external_id (String)

    The tenant identifier in the customer's namespace, as asserted.

  • name (String) (defaults to: nil)

    Human-readable name of the tenant, when one has been asserted.

  • id: (String)
  • external_id: (String)
  • name: (String) (defaults to: nil)


# File 'lib/cadenya/models/tenant_reference.rb', line 26

Instance Attribute Details

#external_idString

Returns the value of attribute external_id.

Returns:

  • (String)


8
9
10
# File 'sig/cadenya/models/tenant_reference.rbs', line 8

def external_id
  @external_id
end

#idString

Returns the value of attribute id.

Returns:

  • (String)


6
7
8
# File 'sig/cadenya/models/tenant_reference.rbs', line 6

def id
  @id
end

#nameString? (readonly)

Returns the value of attribute name.

Returns:

  • (String, nil)


10
11
12
# File 'sig/cadenya/models/tenant_reference.rbs', line 10

def name
  @name
end

Instance Method Details

#name=String (readonly)

Parameters:

  • (String)

Returns:

  • (String)


12
# File 'sig/cadenya/models/tenant_reference.rbs', line 12

def name=: (String) -> String

#to_hash{ id: String, external_id: String, name: String }

Returns:

  • ({ id: String, external_id: String, name: String })


16
# File 'sig/cadenya/models/tenant_reference.rbs', line 16

def to_hash: -> { id: String, external_id: String, name: String }