def iter_get_credit_allocation_history(
self,
account_id: "capo_billing.types.account_id.AccountId",
start_date: datetime.datetime,
end_date: datetime.datetime,
*,
config_overrides: Optional[BillingClientConfig] = None,
credit_id: Optional[int] = None,
next_token: Optional["capo_billing.types.page_token.PageToken"] = None,
max_results: Optional[int] = None,
) -> "Iterator[capo_billing.types.credit_allocation_history_entry.CreditAllocationHistoryEntry]":
_token = next_token
while True:
_response = self.get_credit_allocation_history(
account_id,
start_date,
end_date,
config_overrides=config_overrides,
credit_id=credit_id,
next_token=_token,
max_results=max_results,
)
_page = _resolve_path(_response, ("credit_allocation_history_list",))
for _item in _page or []:
yield _item
_token = _resolve_path(_response, ("next_token",))
if not _token:
break