CampaignFlow.Client.Tenants (CampaignFlow Client v2.0.0)

View Source

Tenant resource operations for the Campaign Flow API.

Summary

Functions

Creates a new tenant.

Deletes a tenant.

Retrieves a specific tenant by ID.

Lists all tenants.

Updates an existing tenant.

Functions

create(client, params)

Creates a new tenant.

Examples

{:ok, tenant} = CampaignFlow.Client.Tenants.create(client, %{
  name: "New Tenant"
})

delete(client, id)

Deletes a tenant.

Examples

{:ok, response} = CampaignFlow.Client.Tenants.delete(client, 123)

get(client, id)

Retrieves a specific tenant by ID.

Examples

{:ok, tenant} = CampaignFlow.Client.Tenants.get(client, 123)

list(client, params \\ [])

Lists all tenants.

Options

  • :page - Page number for pagination
  • :per_page - Number of items per page

Examples

{:ok, tenants} = CampaignFlow.Client.Tenants.list(client)
{:ok, tenants} = CampaignFlow.Client.Tenants.list(client, page: 2)

update(client, id, params)

Updates an existing tenant.

Examples

{:ok, tenant} = CampaignFlow.Client.Tenants.update(client, 123, %{
  name: "Updated Tenant"
})