API module for Unit Customers.
Customers are created automatically when an application is approved.
You cannot create customers directly — listen for the application.approved
webhook to know when a customer is ready.
Summary
Functions
Add authorized users to a customer.
Archive a customer (ends the customer relationship).
Get a customer by ID.
List customers.
Remove an authorized user from a customer.
Update a customer's mutable attributes.
Functions
@spec add_authorized_users(String.t(), [map()], keyword()) :: {:ok, Unit.Resource.Customer.t()} | {:error, term()}
Add authorized users to a customer.
Each user map should include :full_name, :email, :phone, and
optionally :jwt_subject.
@spec archive( String.t(), keyword() ) :: {:ok, Unit.Resource.Customer.t()} | {:error, term()}
Archive a customer (ends the customer relationship).
@spec get( String.t(), keyword() ) :: {:ok, Unit.Resource.Customer.t()} | {:error, term()}
Get a customer by ID.
@spec list(keyword()) :: {:ok, [Unit.Resource.Customer.t()], map()} | {:error, term()}
List customers.
Filter options
:email,:tags,:status—"Active"|"Archived"
Remove an authorized user from a customer.
@spec update(String.t(), map(), keyword()) :: {:ok, Unit.Resource.Customer.t()} | {:error, term()}
Update a customer's mutable attributes.
Pass :type to specify the customer type (default "individualCustomer").