Skip to content

iter_get_offer_terms async

iter_get_offer_terms(
    offer_id: OfferId,
    *,
    config_overrides: Optional[AsyncMarketplaceDiscoveryClientConfig] = None,
    locale: Optional[Locale] = None,
    max_results: Optional[int] = None,
    next_token: Optional[NextToken] = None,
) -> AsyncIterator[OfferTerm]
Source code in docs_src/capo_marketplace_discovery/_services/async_marketplace_discovery.py
async def iter_get_offer_terms(
    self,
    offer_id: "capo_marketplace_discovery.types.offer_id.OfferId",
    *,
    config_overrides: Optional[AsyncMarketplaceDiscoveryClientConfig] = None,
    locale: Optional["capo_marketplace_discovery.types.locale.Locale"] = None,
    max_results: Optional[int] = None,
    next_token: Optional[
        "capo_marketplace_discovery.types.next_token.NextToken"
    ] = None,
) -> "AsyncIterator[capo_marketplace_discovery.types.offer_term.OfferTerm]":
    _token = next_token
    while True:
        _response = await self.get_offer_terms(
            offer_id,
            config_overrides=config_overrides,
            locale=locale,
            max_results=max_results,
            next_token=_token,
        )
        _page = _resolve_path(_response, ("offer_terms",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break