PolarExpress.Services.CustomerPortal.MembersService (polar_express v0.1.6)

Copy Markdown View Source

Members

Members API operations.

Summary

Functions

add_member(client, params \\ %{}, opts \\ [])

Add Member

Add a new member to the customer's team.

Only available to owners and billing managers of team customers.

Rules:

  • Cannot add a member with the owner role (there must be exactly one owner)
  • If a member with this email already exists, the existing member is returned

See PolarExpress.Params.CustomerPortal.MembersAddMemberParams for parameter details.

list_members(client, params \\ %{}, opts \\ [])

@spec list_members(PolarExpress.Client.t(), map(), keyword()) ::
  {:ok, PolarExpress.ListObject.t()} | {:error, PolarExpress.Error.t()}

List Members

List all members of the customer's team.

Only available to owners and billing managers of team customers.

See PolarExpress.Params.CustomerPortal.MembersListMembersParams for parameter details.

remove_member(client, id, params \\ %{}, opts \\ [])

@spec remove_member(PolarExpress.Client.t(), String.t(), map(), keyword()) ::
  {:ok, term()} | {:error, PolarExpress.Error.t()}

Remove Member

Remove a member from the team.

Only available to owners and billing managers of team customers.

Rules:

  • Cannot remove yourself
  • Cannot remove the only owner

See PolarExpress.Params.CustomerPortal.MembersRemoveMemberParams for parameter details.

update_member(client, id, params \\ %{}, opts \\ [])

Update Member

Update a member's role.

Only available to owners and billing managers of team customers.

Rules:

  • Cannot modify your own role (to prevent self-demotion)
  • Customer must have exactly one owner at all times

See PolarExpress.Params.CustomerPortal.MembersUpdateMemberParams for parameter details.