Polar::Api::Organizations
API client for organizations operations
Constants
Constructors
Creates a new Organizations instance
@param client [Client] The Polar API client instance
Instance methods
Create Organization
Create an organization.
Scopes: organizations:write
Endpoint: POST /v1/organizations/
Parameters:
body(required): Request body as Polar::Models::OrganizationCreate
Returns: Polar::Models::Organization
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors
Get Organization
Get an organization by ID.
Scopes: organizations:read organizations:write
Endpoint: GET /v1/organizations/{id}
Parameters:
id(required): Path parameter
Returns: Polar::Models::Organization
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors
List Organizations
List organizations.
Scopes: organizations:read organizations:write
Endpoint: GET /v1/organizations/
Parameters:
slug(optional): Filter by slug.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::Organization)
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors
Update Organization
Update an organization.
Scopes: organizations:write
Endpoint: PATCH /v1/organizations/{id}
Parameters:
id(required): Path parameterbody(required): Request body as Polar::Models::OrganizationUpdate
Returns: Polar::Models::Organization
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors