## List Costs `v1.customers.list_costs(CustomerListCostsParams**kwargs) -> SyncCursorPage[CustomerListCostsResponse]` **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 - **customer\_id:** `str` - **ending\_before:** `Union[str, datetime]` RFC 3339 timestamp (exclusive) - **starting\_on:** `Union[str, datetime]` RFC 3339 timestamp (inclusive) - **limit:** `int` Max number of results that should be returned - **next\_page:** `str` Cursor that indicates where the next page of results should start. ### Returns - `class CustomerListCostsResponse` - **credit\_types:** `Dict[str, CreditTypes]` - **cost:** `Optional[float]` - **line\_item\_breakdown:** `Optional[List[CreditTypesLineItemBreakdown]]` - **cost:** `float` - **name:** `str` - **group\_key:** `Optional[str]` - **group\_value:** `Optional[str]` - **name:** `Optional[str]` - **end\_timestamp:** `datetime` - **start\_timestamp:** `datetime` ### Example ```python from datetime import datetime from metronome import Metronome client = Metronome( bearer_token="My Bearer Token", ) page = client.v1.customers.list_costs( customer_id="d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc", ending_before=datetime.fromisoformat("2019-12-27T18:11:19.117"), starting_on=datetime.fromisoformat("2019-12-27T18:11:19.117"), ) page = page.data[0] print(page.credit_types) ```