class

Polar::Api::CustomerPortal::CustomerMeters

Inherits Reference < Object

API client for customer_meters operations in customer_portal context

Constants

Log = ::Log.for(self)

Constructors

new(client : Client)

Creates a new CustomerMeters instance

@param client [Client] The Polar API client instance

Source

Instance methods

Get Customer Meter

Get a meter by ID for the authenticated customer.

Scopes: customer_portal:read customer_portal:write

Endpoint: GET /v1/customer-portal/meters/{id}

Parameters:

  • id (required): The customer meter ID.

Returns: Polar::Models::CustomerCustomerMeter

Raises:

  • ResourceNotFoundError on 404
  • NotPermittedError on 403
  • HTTPValidationError on 422
  • PolarError on other errors
Source
list(meter_id : String | Nil = nil, query : String | Nil = nil, page : Int32 | Nil = nil, limit : Int32 | Nil = nil, sorting : String | Nil = nil) : Polar::Models::ListResource(Polar::Models::CustomerCustomerMeter)

List Meters

List meters of the authenticated customer.

Scopes: customer_portal:read customer_portal:write

Endpoint: GET /v1/customer-portal/meters/

Parameters:

  • meter_id (optional): Filter by meter ID.
  • query (optional): Filter by meter name.
  • 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::CustomerCustomerMeter)

Raises:

  • ResourceNotFoundError on 404
  • NotPermittedError on 403
  • HTTPValidationError on 422
  • PolarError on other errors
Source