getBusinessAccountGiftsFlow

fun TelegramBot.getBusinessAccountGiftsFlow(businessConnectionId: BusinessConnectionId, excludeUnsaved: Boolean = false, excludeSaved: Boolean = false, excludeUnlimited: Boolean = false, excludeLimited: Boolean = false, excludeUnique: Boolean = false, sortByPrice: Boolean = false, initialOffset: String? = null, limit: Int? = null, onErrorContinueChecker: suspend (Throwable?) -> Boolean = { false }): Flow<OwnedGifts<GiftSentOrReceived.ReceivedInBusinessAccount>>

Creates a flow that emits business account gifts in a paginated manner.

This function will automatically handle pagination by using the nextOffset from each response to fetch the next page of gifts until there are no more gifts to fetch.

Return

A flow that emits OwnedGifts containing the fetched gifts

Parameters

businessConnectionId

The ID of the business connection

excludeUnsaved

Whether to exclude unsaved gifts

excludeSaved

Whether to exclude saved gifts

excludeUnlimited

Whether to exclude unlimited gifts

excludeLimited

Whether to exclude limited gifts

excludeUnique

Whether to exclude unique gifts

sortByPrice

Whether to sort gifts by price

initialOffset

The initial offset to start fetching from. If null, starts from the beginning

limit

The maximum number of gifts to fetch per request

onErrorContinueChecker

A function that determines whether to continue fetching on error. Returns true to continue, false to stop. Default is to stop on any error.