Stripe.ListObject (tiger_stripe v0.1.10)

Copy Markdown View Source

Represents a V1 paginated list response (object: "list").

Auto-paging

client = Stripe.client("sk_test_...")
{:ok, page} = Stripe.Client.request(client, :get, "/v1/charges")

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

Summary

Functions

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

Types

t()

@type t() :: %Stripe.ListObject{
  data: [struct() | map()] | nil,
  has_more: boolean() | nil,
  object: String.t() | nil,
  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 pages.

Uses starting_after cursor pagination. The stream fetches the next page only when consumed (via Enum or Stream functions).