Polarex.LicenseKeys (Polarex v0.2.8)

View Source

Provides API endpoints related to license keys

Summary

Functions

customer_portal_license_keys_activate(body, opts \\ [])

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.

customer_portal_license_keys_deactivate(body, opts \\ [])

@spec customer_portal_license_keys_deactivate(
  Polarex.LicenseKeyDeactivate.t(),
  keyword()
) ::
  :ok | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.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.

customer_portal_license_keys_get(id, opts \\ [])

@spec customer_portal_license_keys_get(
  String.t(),
  keyword()
) ::
  {:ok, Polarex.LicenseKeyWithActivations.t()}
  | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}

Get License Key

Get a license key.

Scopes: customer_portal:read customer_portal:write

customer_portal_license_keys_list(opts \\ [])

@spec customer_portal_license_keys_list(keyword()) ::
  {:ok, Polarex.ListResourceLicenseKeyRead.t()}
  | {:error,
     Polarex.HTTPValidationError.t()
     | Polarex.ResourceNotFound.t()
     | Polarex.Unauthorized.t()}

List License Keys

Scopes: customer_portal:read customer_portal:write

Options

  • benefit_id: Filter by a specific benefit
  • page: Page number, defaults to 1.
  • limit: Size of a page, defaults to 10. Maximum is 100.

customer_portal_license_keys_validate(body, opts \\ [])

@spec customer_portal_license_keys_validate(
  Polarex.LicenseKeyValidate.t(),
  keyword()
) ::
  {:ok, Polarex.ValidatedLicenseKey.t()}
  | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.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.

license_keys_activate(body, opts \\ [])

Activate License Key

Activate a license key instance.

Scopes: license_keys:write

license_keys_deactivate(body, opts \\ [])

@spec license_keys_deactivate(
  Polarex.LicenseKeyDeactivate.t(),
  keyword()
) ::
  :ok | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}

Deactivate License Key

Deactivate a license key instance.

Scopes: license_keys:write

license_keys_get(id, opts \\ [])

Get License Key

Get a license key.

Scopes: license_keys:read license_keys:write

license_keys_get_activation(id, activation_id, opts \\ [])

Get Activation

Get a license key activation.

Scopes: license_keys:read license_keys:write

license_keys_list(opts \\ [])

List License Keys

Get license keys connected to the given organization & filters.

Scopes: license_keys:read license_keys:write

Options

  • organization_id: Filter by organization ID.
  • benefit_id: Filter by benefit ID.
  • page: Page number, defaults to 1.
  • limit: Size of a page, defaults to 10. Maximum is 100.

license_keys_update(id, body, opts \\ [])

Update License Key

Update a license key.

Scopes: license_keys:write

license_keys_validate(body, opts \\ [])

Validate License Key

Validate a license key.

Scopes: license_keys:write