Stripe.V2.ListObject (tiger_stripe v0.1.10)

Copy Markdown View Source

Represents a V2 paginated list response (detected by next_page_url key).

Auto-paging

{:ok, page} = Stripe.Client.request(client, :get, "/v2/core/events",
  api_mode: :v2)

page
|> Stripe.V2.ListObject.auto_paging_stream(client)
|> Enum.take(100)

Summary

Functions

Returns a lazy Stream that yields every item across all V2 pages.

Types

t()

@type t() :: %Stripe.V2.ListObject{
  data: [struct() | map()] | nil,
  next_page_url: String.t() | nil
}

Functions

auto_paging_stream(page, client, opts \\ [])

@spec auto_paging_stream(t(), Stripe.Client.t(), keyword()) :: Enumerable.t()

Returns a lazy Stream that yields every item across all V2 pages.

Uses URL-based pagination — fetches next_page_url directly.