Polarex.Organizations (Polarex v0.1.0)

View Source

Provides API endpoints related to organizations

Summary

Functions

customer_portal_organizations_get(slug, opts \\ [])

@spec customer_portal_organizations_get(
  String.t(),
  keyword()
) ::
  {:ok, Polarex.CustomerOrganization.t()}
  | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}

Get Organization

Get a customer portal's organization by slug.

organizations_create(body, opts \\ [])

@spec organizations_create(
  Polarex.OrganizationCreate.t(),
  keyword()
) :: {:ok, Polarex.Organization.t()} | {:error, Polarex.HTTPValidationError.t()}

Create Organization

Create an organization.

Scopes: organizations:write

organizations_get(id, opts \\ [])

@spec organizations_get(
  String.t(),
  keyword()
) ::
  {:ok, Polarex.Organization.t()}
  | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}

Get Organization

Get an organization by ID.

Scopes: organizations:read organizations:write

organizations_list(opts \\ [])

@spec organizations_list(keyword()) ::
  {:ok, Polarex.ListResourceOrganization.t()}
  | {:error, Polarex.HTTPValidationError.t()}

List Organizations

List organizations.

Scopes: organizations:read organizations:write

Options

  • slug: Filter by slug.
  • page: Page number, defaults to 1.
  • limit: Size of a page, defaults to 10. Maximum is 100.
  • sorting: Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign - before the criteria name to sort by descending order.

organizations_update(id, body, opts \\ [])

Update Organization

Update an organization.

Scopes: organizations:write