Search documentation of polar_express

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

Copy Markdown View Source

License-keys

LicenseKeys API operations.

## Summary

### Functions

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

Activate License Key

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

Deactivate License Key

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

Get License Key

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

List License Keys

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

Validate License Key

## Functions

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

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

Activate License Key

Activate a license key instance.

> This endpoint doesn't require authentication and can be safely used on a public client, like a desktop application or a mobile app. If you plan to validate a license key on a server, use the `/v1/license-keys/activate` endpoint instead.

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

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

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

Deactivate License Key

Deactivate a license key instance.

> This endpoint doesn't require authentication and can be safely used on a public client, like a desktop application or a mobile app. If you plan to validate a license key on a server, use the `/v1/license-keys/deactivate` endpoint instead.

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

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

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

Get License Key

Get a license key.

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

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

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

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

List License Keys

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

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

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

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

Validate License Key

Validate a license key.

> This endpoint doesn't require authentication and can be safely used on a public client, like a desktop application or a mobile app. If you plan to validate a license key on a server, use the `/v1/license-keys/validate` endpoint instead.

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