Polar::Api::CustomerPortal::LicenseKeys
API client for license_keys operations in customer_portal context
Constants
Constructors
Creates a new LicenseKeys instance
@param client [Client] The Polar API client instance
Instance methods
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.
Endpoint: POST /v1/customer-portal/license-keys/activate
Parameters:
body(required): Request body as Polar::Models::LicenseKeyActivate
Returns: Polar::Models::LicenseKeyActivationRead
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors
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.
Endpoint: POST /v1/customer-portal/license-keys/deactivate
Parameters:
body(required): Request body as Polar::Models::LicenseKeyDeactivate
Returns: JSON response string
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors
Get License Key
Get a license key.
Scopes: customer_portal:read customer_portal:write
Endpoint: GET /v1/customer-portal/license-keys/{id}
Parameters:
id(required): Path parameter
Returns: Polar::Models::LicenseKeyWithActivations
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors
List License Keys
Scopes: customer_portal:read customer_portal:write
Endpoint: GET /v1/customer-portal/license-keys/
Parameters:
benefit_id(optional): Filter by a specific benefitpage(optional): Page number, defaults to 1.limit(optional): Size of a page, defaults to 10. Maximum is 100.
Returns: Polar::Models::ListResource(Polar::Models::LicenseKeyRead)
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors
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.
Endpoint: POST /v1/customer-portal/license-keys/validate
Parameters:
body(required): Request body as Polar::Models::LicenseKeyValidate
Returns: Polar::Models::ValidatedLicenseKey
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors