Polar::Api::BenefitGrants
API client for benefit_grants operations
Constants
Log = ::Log.for(self)
Constructors
new(client : Client)
Creates a new BenefitGrants instance
@param client [Client] The Polar API client instance
Instance methods
list(organization_id : String | Nil = nil, customer_id : String | Nil = nil, is_granted : String | Nil = nil, page : Int32 | Nil = nil, limit : Int32 | Nil = nil, sorting : String | Nil = nil) : Polar::Models::ListResource(Polar::Models::BenefitGrant)
List Benefit Grants
List benefit grants across all benefits for the authenticated organization.
Scopes: benefits:read benefits:write
Endpoint: GET /v1/benefit-grants/
Parameters:
organization_id(optional): Filter by organization ID.customer_id(optional): Filter by customer ID.is_granted(optional): Filter by granted status. If true, only granted benefits will be returned. If false, only revoked benefits will be returned.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::BenefitGrant)
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors