Polar::Api::CustomerPortal::BenefitGrants
API client for benefit_grants operations in customer_portal context
Constants
Constructors
Creates a new BenefitGrants instance
@param client [Client] The Polar API client instance
Instance methods
Get Benefit Grant
Get a benefit grant by ID for the authenticated customer.
Scopes: customer_portal:read customer_portal:write
Endpoint: GET /v1/customer-portal/benefit-grants/{id}
Parameters:
id(required): The benefit grant ID.
Returns: Polar::Models::CustomerBenefitGrant
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors
List Benefit Grants
List benefits grants of the authenticated customer.
Scopes: customer_portal:read customer_portal:write
Endpoint: GET /v1/customer-portal/benefit-grants/
Parameters:
type(optional): Filter by benefit type.benefit_id(optional): Filter by benefit ID.checkout_id(optional): Filter by checkout ID.order_id(optional): Filter by order ID.subscription_id(optional): Filter by subscription ID.page(optional): Page number, defaults to 1.limit(optional): Size of a page, defaults to 10. Maximum is 100.sorting(optional): Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign - before the criteria name to sort by descending order.
Returns: Polar::Models::ListResource(Polar::Models::CustomerBenefitGrant)
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors
Update Benefit Grant
Update a benefit grant for the authenticated customer.
Scopes: customer_portal:write
Endpoint: PATCH /v1/customer-portal/benefit-grants/{id}
Parameters:
id(required): The benefit grant ID.body(required): Request body as Polar::Models::CustomerBenefitGrantUpdate
Returns: Polar::Models::CustomerBenefitGrant
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors