Class: Hatchet::Features::Tenant

Inherits:
Object
  • Object
show all
Defined in:
lib/hatchet/features/tenant.rb

Overview

Tenant client for interacting with the current Hatchet tenant

This class provides a high-level interface for retrieving tenant information from the Hatchet system.

Examples:

Getting the current tenant

tenant_info = tenant_client.get

Since:

  • 0.1.0

Instance Method Summary collapse

Constructor Details

#initialize(rest_client, config) ⇒ void

Initializes a new Tenant client instance

Parameters:

  • rest_client (Object)

    The configured REST client for API communication

  • config (Hatchet::Config)

    The Hatchet configuration containing tenant_id and other settings

Since:

  • 0.1.0



21
22
23
24
25
# File 'lib/hatchet/features/tenant.rb', line 21

def initialize(rest_client, config)
  @rest_client = rest_client
  @config = config
  @tenant_api = HatchetSdkRest::TenantApi.new(rest_client)
end

Instance Method Details

#getObject

Get the current tenant

Examples:

tenant = tenant_client.get

Returns:

  • (Object)

    The tenant details

Raises:

Since:

  • 0.1.0



33
34
35
# File 'lib/hatchet/features/tenant.rb', line 33

def get
  @tenant_api.tenant_get(@config.tenant_id)
end