StripeManaged.Client (StripeManaged v0.1.0)

Copy Markdown View Source

HTTP client for the Stripe API.

Handles authentication, request encoding, response parsing, and retries. All resource modules delegate to this module for actual HTTP calls.

Summary

Functions

Performs a DELETE request.

Performs a GET request.

Lists resources with auto-pagination support.

Performs a POST request with form-encoded body.

Types

response()

@type response() :: {:ok, map()} | {:error, StripeManaged.Error.t()}

Functions

delete(path, opts \\ [])

@spec delete(
  String.t(),
  keyword()
) :: response()

Performs a DELETE request.

get(path, opts \\ [])

@spec get(
  String.t(),
  keyword()
) :: response()

Performs a GET request.

list_paginated(path, params \\ %{}, opts \\ [])

@spec list_paginated(String.t(), map(), keyword()) :: Enumerable.t()

Lists resources with auto-pagination support.

Returns a Stream that lazily fetches pages.

post(path, params \\ nil, opts \\ [])

@spec post(String.t(), map() | nil, keyword()) :: response()

Performs a POST request with form-encoded body.