## List Customers `v1.plans.list_customers(**kwargs) -> CursorPage` **get** `/v1/planDetails/{plan_id}/customers` Fetches a list of customers on a specific plan (by default, only currently active plans are included) ### Parameters - **plan\_id:** `String` - **limit:** `Integer` Max number of results that should be returned - **next\_page:** `String` Cursor that indicates where the next page of results should start. - **status:** `:all | :active | :ended | :upcoming` Status of customers on a given plan. Defaults to `active`. * `all` - Return current, past, and upcoming customers of the plan. * `active` - Return current customers of the plan. * `ended` - Return past customers of the plan. * `upcoming` - Return upcoming customers of the plan. Multiple statuses can be OR'd together using commas, e.g. `active,ended`. **Note:** `ended,upcoming` combination is not yet supported. - `:all` - `:active` - `:ended` - `:upcoming` ### Returns - `class PlanListCustomersResponse` - **customer\_details:** `CustomerDetail` - **plan\_details:** `{ id, custom_fields, customer_plan_id, 3 more}` - **id:** `String` - **custom\_fields:** `Hash[Symbol, String]` - **customer\_plan\_id:** `String` - **name:** `String` - **starting\_on:** `Time` The start date of the plan - **ending\_before:** `Time` The end date of the plan ### Example ```ruby require "metronome_sdk" metronome = MetronomeSDK::Client.new(bearer_token: "My Bearer Token") page = metronome.v1.plans.list_customers(plan_id: "d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc") puts(page) ```