/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { tenantsGetTenantBillingUsage } from "../funcs/tenants-get-tenant-billing-usage.js"; import { tenantsGetTenantById } from "../funcs/tenants-get-tenant-by-id.js"; import { tenantsUpdateTenant } from "../funcs/tenants-update-tenant.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import { unwrapAsync } from "../types/fp.js"; import * as models from "./models/index.js"; export class Tenants extends ClientSDK { /** * Get billing usage for the current tenant * * @remarks * Use when showing the current tenant's billing usage (e.g. admin billing page or usage caps). Returns subscription and usage for the tenant. */ async getTenantBillingUsage( options?: RequestOptions, ): Promise { return unwrapAsync(tenantsGetTenantBillingUsage( this, options, )); } /** * Update a tenant * * @remarks * Use when changing tenant details (e.g. name or billing info). Request body contains the fields to update. */ async updateTenant( request: models.UpdateTenantRequest, options?: RequestOptions, ): Promise { return unwrapAsync(tenantsUpdateTenant( this, request, options, )); } /** * Get tenant by ID * * @remarks * Get tenant by ID */ async getTenantById( id: string, options?: RequestOptions, ): Promise { return unwrapAsync(tenantsGetTenantById( this, id, options, )); } }