## List Customers `client.V1.Plans.ListCustomers(ctx, params) (*CursorPage[V1PlanListCustomersResponse], error)` **get** `/v1/planDetails/{plan_id}/customers` Fetches a list of customers on a specific plan (by default, only currently active plans are included) ### Parameters - **params:** `V1PlanListCustomersParams` - **PlanID:** `param.Field[string]` Path param: - **Limit:** `param.Field[int64]` Query param: Max number of results that should be returned - **NextPage:** `param.Field[string]` Query param: Cursor that indicates where the next page of results should start. - **Status:** `param.Field[V1PlanListCustomersParamsStatus]` Query param: 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. - `V1PlanListCustomersParamsStatus` - `V1PlanListCustomersParamsStatus` - `V1PlanListCustomersParamsStatus` - `V1PlanListCustomersParamsStatus` ### Returns - Not supported - **CustomerDetails:** `CustomerDetail` - **PlanDetails:** `V1PlanListCustomersResponsePlanDetails` - **ID:** `string` - **CustomFields:** `map[string, string]` - **CustomerPlanID:** `string` - **Name:** `string` - **StartingOn:** `Time` The start date of the plan - **EndingBefore:** `Time` The end date of the plan ### Example ```go package main import ( "context" "fmt" "github.com/Metronome-Industries/metronome-go" "github.com/Metronome-Industries/metronome-go/option" ) func main() { client := metronome.NewClient( option.WithBearerToken("My Bearer Token"), ) page, err := client.V1.Plans.ListCustomers(context.TODO(), metronome.V1PlanListCustomersParams{ PlanID: metronome.F("d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", page) } ```