## List Costs `client.V1.Customers.ListCosts(ctx, params) (*CursorPage[V1CustomerListCostsResponse], error)` **get** `/v1/customers/{customer_id}/costs` Fetch daily pending costs for the specified customer, broken down by credit type and line items. Note: this is not supported for customers whose plan includes a UNIQUE-type billable metric. ### Parameters - **params:** `V1CustomerListCostsParams` - **CustomerID:** `param.Field[string]` Path param: - **EndingBefore:** `param.Field[Time]` Query param: RFC 3339 timestamp (exclusive) - **StartingOn:** `param.Field[Time]` Query param: RFC 3339 timestamp (inclusive) - **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. ### Returns - Not supported - **CreditTypes:** `map[string, V1CustomerListCostsResponseCreditType]` - **Cost:** `float64` - **LineItemBreakdown:** `[]V1CustomerListCostsResponseCreditTypesLineItemBreakdown` - **Cost:** `float64` - **Name:** `string` - **GroupKey:** `string` - **GroupValue:** `string` - **Name:** `string` - **EndTimestamp:** `Time` - **StartTimestamp:** `Time` ### Example ```go package main import ( "context" "fmt" "time" "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.Customers.ListCosts(context.TODO(), metronome.V1CustomerListCostsParams{ CustomerID: metronome.F("d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc"), EndingBefore: metronome.F(time.Now()), StartingOn: metronome.F(time.Now()), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", page) } ```