Class: AxHub::AppsClient

Inherits:
Object
  • Object
show all
Defined in:
lib/axhub_sdk.rb,
lib/axhub_sdk/raw_db.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ AppsClient

Returns a new instance of AppsClient.



301
302
303
# File 'lib/axhub_sdk.rb', line 301

def initialize(client)
  @client = client
end

Instance Method Details

#create(**body) ⇒ Object

Raises:



304
305
306
307
# File 'lib/axhub_sdk.rb', line 304

def create(**body)
  tenant = @client.instance_variable_get(:@default_tenant_id); raise Error.new(category: 'tenant_id_required', code: 'tenant_id_required', message: 'default tenant id is required') if tenant.nil? || tenant.empty?
  @client.request('appsPostApiV1TenantsByTenantIDApps', path_params: { tenantID: tenant }, body: body)
end

#raw_dbObject

Typed, read-only raw-DB facade (client.apps.raw_db). Mirrors Go's client.Apps.RawDb() / Node's sdk.apps.rawDb.



84
85
86
# File 'lib/axhub_sdk/raw_db.rb', line 84

def raw_db
  @raw_db ||= RawDbClient.new(@client)
end