Skip to content

iter_list_custom_line_items

iter_list_custom_line_items(
    *,
    config_overrides: Optional[billingconductorClientConfig] = None,
    billing_period: Optional[BillingPeriod] = None,
    max_results: Optional[MaxCustomLineItemResults] = None,
    next_token: Optional[Token] = None,
    filters: Optional[ListCustomLineItemsFilter] = None,
) -> Iterator[CustomLineItemListElement]
Source code in docs_src/capo_billingconductor/_services/billingconductor.py
def iter_list_custom_line_items(
    self,
    *,
    config_overrides: Optional[billingconductorClientConfig] = None,
    billing_period: Optional[
        "capo_billingconductor.types.billing_period.BillingPeriod"
    ] = None,
    max_results: Optional[
        "capo_billingconductor.types.max_custom_line_item_results.MaxCustomLineItemResults"
    ] = None,
    next_token: Optional["capo_billingconductor.types.token.Token"] = None,
    filters: Optional[
        "capo_billingconductor.types.list_custom_line_items_filter.ListCustomLineItemsFilter"
    ] = None,
) -> "Iterator[capo_billingconductor.types.custom_line_item_list_element.CustomLineItemListElement]":
    _token = next_token
    while True:
        _response = self.list_custom_line_items(
            config_overrides=config_overrides,
            billing_period=billing_period,
            max_results=max_results,
            next_token=_token,
            filters=filters,
        )
        _page = _resolve_path(_response, ("custom_line_items",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break