PolarExpress.Services.CustomerPortal.MembersService
(polar_express v0.1.6)
Copy Markdown
View Source
Members
Members API operations.
Summary
Functions
@spec add_member(PolarExpress.Client.t(), map(), keyword()) :: {:ok, PolarExpress.Schemas.CustomerPortalMember.t()} | {:error, PolarExpress.Error.t()}
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.
@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.
@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.
@spec update_member(PolarExpress.Client.t(), String.t(), map(), keyword()) :: {:ok, PolarExpress.Schemas.CustomerPortalMember.t()} | {:error, PolarExpress.Error.t()}
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.