Search documentation of polar_express

# PolarExpress.Services.CustomerPortal.SubscriptionsService (polar_express v0.1.5)

Copy Markdown View Source

Subscriptions

Subscriptions API operations.

## Summary

### Functions

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

Cancel Subscription

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

Get Subscription

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

List Subscriptions

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

Update Subscription

## Functions

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

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

Cancel Subscription

Cancel a subscription of the authenticated customer.

See `PolarExpress.Params.CustomerPortal.SubscriptionsCancelSubscriptionParams` for parameter details.

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

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

Get Subscription

Get a subscription for the authenticated customer.

Scopes: `customer_portal:read` `customer_portal:write`

See `PolarExpress.Params.CustomerPortal.SubscriptionsGetSubscriptionParams` for parameter details.

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

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

List Subscriptions

List subscriptions of the authenticated customer.

Scopes: `customer_portal:read` `customer_portal:write`

See `PolarExpress.Params.CustomerPortal.SubscriptionsListSubscriptionsParams` for parameter details.

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

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

Update Subscription

Update a subscription of the authenticated customer.

See `PolarExpress.Params.CustomerPortal.SubscriptionsUpdateSubscriptionParams` for parameter details.