Search documentation of polar_express

# PolarExpress.Services.MembersService (polar_express v0.1.5)

Copy Markdown View Source

Members

Members API operations.

## Summary

### Functions

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

Create Member

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

Delete Member

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

Get Member

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

List Members

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

Update Member

## Functions

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

    @spec create_member(PolarExpress.Client.t(), map(), keyword()) ::
      {:ok, PolarExpress.Schemas.Member.t()} | {:error, PolarExpress.Error.t()}

Create Member

Create a new member for a customer.

Only B2B customers with the member management feature enabled can add members. The authenticated user or organization must have access to the customer's organization.

Scopes: `members:write`

See `PolarExpress.Params.MembersCreateMemberParams` for parameter details.

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

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

Delete Member

Delete a member.

The authenticated user or organization must have access to the member's organization.

Scopes: `members:write`

See `PolarExpress.Params.MembersDeleteMemberParams` for parameter details.

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

    @spec get_member(PolarExpress.Client.t(), String.t(), map(), keyword()) ::
      {:ok, PolarExpress.Schemas.Member.t()} | {:error, PolarExpress.Error.t()}

Get Member

Get a member by ID.

The authenticated user or organization must have access to the member's organization.

Scopes: `members:read` `members:write`

See `PolarExpress.Params.MembersGetMemberParams` 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 members with optional customer ID filter.

Scopes: `members:read` `members:write`

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

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

    @spec update_member(PolarExpress.Client.t(), String.t(), map(), keyword()) ::
      {:ok, PolarExpress.Schemas.Member.t()} | {:error, PolarExpress.Error.t()}

Update Member

Update a member.

Only name and role can be updated. The authenticated user or organization must have access to the member's organization.

Scopes: `members:write`

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