Customer grants produced by fulfilment entitlements.
Summary
Types
Parameters for entitlement_grants_fulfill_license_key. Exact fields use atom keys; string-keyed and mixed-key maps remain supported. Source: locked upstream resources/entitlements/grants.ts declaration GrantFulfillLicenseKeyParams.
Parameters for entitlement_grants_list. Exact fields use atom keys; string-keyed and mixed-key maps remain supported. Source: locked upstream resources/entitlements/grants.ts declaration GrantListParams.
Functions
Calls Dodo operation entitlement_grants_fulfill_license_key (POST /grants/{grant_id}/license-key). Required parameters: :key.
Calls Dodo operation entitlement_grants_fulfill_license_key (POST /grants/{grant_id}/license-key). Required parameters: :key.
Calls Dodo operation entitlement_grants_list (GET /entitlements/{id}/grants). Required parameters: none. Numbered pagination is zero-based.
Calls Dodo operation entitlement_grants_list (GET /entitlements/{id}/grants). Required parameters: none. Numbered pagination is zero-based.
Calls Dodo operation entitlement_grants_list (GET /entitlements/{id}/grants). Required parameters: none. Numbered pagination is zero-based.
Calls Dodo operation entitlement_grants_revoke (DELETE /entitlements/{id}/grants/{grant_id}). Required parameters: none.
Types
@type fulfill_license_key_params() :: %{ :key => String.t(), optional(:activations_limit) => number(), optional(:expires_at) => String.t(), optional(String.t()) => DodoPayments.RequestTypes.input_value() } | DodoPayments.RequestTypes.compatibility_params()
Parameters for entitlement_grants_fulfill_license_key. Exact fields use atom keys; string-keyed and mixed-key maps remain supported. Source: locked upstream resources/entitlements/grants.ts declaration GrantFulfillLicenseKeyParams.
@type list_params() :: %{ optional(:page_number) => number(), optional(:page_size) => number(), optional(:customer_id) => String.t(), optional(:status) => DodoPayments.Enums.entitlement_grant_status(), optional(String.t()) => DodoPayments.RequestTypes.input_value() } | DodoPayments.RequestTypes.compatibility_params()
Parameters for entitlement_grants_list. Exact fields use atom keys; string-keyed and mixed-key maps remain supported. Source: locked upstream resources/entitlements/grants.ts declaration GrantListParams.
Functions
@spec fulfill_license_key( DodoPayments.Client.t(), String.t() | integer(), fulfill_license_key_params() ) :: {:ok, DodoPayments.EntitlementGrant.t()} | {:error, Exception.t()}
Calls Dodo operation entitlement_grants_fulfill_license_key (POST /grants/{grant_id}/license-key). Required parameters: :key.
API parameters must be supplied as a map.
@spec fulfill_license_key( DodoPayments.Client.t(), String.t() | integer(), fulfill_license_key_params(), keyword() ) :: {:ok, DodoPayments.EntitlementGrant.t() | DodoPayments.Response.t(DodoPayments.EntitlementGrant.t())} | {:error, Exception.t()}
Calls Dodo operation entitlement_grants_fulfill_license_key (POST /grants/{grant_id}/license-key). Required parameters: :key.
The final argument contains request-local options.
@spec list(DodoPayments.Client.t(), String.t() | integer()) :: {:ok, DodoPayments.Page.Numbered.t(DodoPayments.EntitlementGrant.t())} | {:error, Exception.t()}
Calls Dodo operation entitlement_grants_list (GET /entitlements/{id}/grants). Required parameters: none. Numbered pagination is zero-based.
Calls the operation with an empty parameter map.
@spec list( DodoPayments.Client.t(), String.t() | integer(), list_params() | nil | keyword() ) :: {:ok, DodoPayments.Page.Numbered.t(DodoPayments.EntitlementGrant.t()) | DodoPayments.Response.t( DodoPayments.Page.Numbered.t(DodoPayments.EntitlementGrant.t()) )} | {:error, Exception.t()}
Calls Dodo operation entitlement_grants_list (GET /entitlements/{id}/grants). Required parameters: none. Numbered pagination is zero-based.
Pass a map for Dodo parameters or a keyword list for request-local options.
@spec list( DodoPayments.Client.t(), String.t() | integer(), list_params() | nil, keyword() ) :: {:ok, DodoPayments.Page.Numbered.t(DodoPayments.EntitlementGrant.t()) | DodoPayments.Response.t( DodoPayments.Page.Numbered.t(DodoPayments.EntitlementGrant.t()) )} | {:error, Exception.t()}
Calls Dodo operation entitlement_grants_list (GET /entitlements/{id}/grants). Required parameters: none. Numbered pagination is zero-based.
Accepts both a Dodo parameter map and request-local options.
@spec revoke( DodoPayments.Client.t(), String.t() | integer(), String.t() | integer(), keyword() ) :: {:ok, DodoPayments.EntitlementGrant.t() | DodoPayments.Response.t(DodoPayments.EntitlementGrant.t())} | {:error, Exception.t()}
Calls Dodo operation entitlement_grants_revoke (DELETE /entitlements/{id}/grants/{grant_id}). Required parameters: none.
Options are request-local.