Accrue.Connect.AccountLink (accrue v0.3.0)

Copy Markdown View Source

Onboarding/update bearer credential for a connected account.

The :url field is a single-use short-lived (~5 minute) bearer credential that authorizes the recipient to complete Stripe's hosted onboarding flow for the connected account. Any leak via Logger, APM, crash dumps, or telemetry handlers is a takeover vector — Inspect masks :url as <redacted> the same way as Accrue.BillingPortal.Session.

Create-only resource: Stripe exposes no retrieve/update/delete/list endpoint for AccountLinks — build a new one each time.

Summary

Functions

Projects a raw processor response (atom- or string-keyed map, or a bare processor struct unwrapped to map form) into a tightly-typed t(). Unix integer timestamps are converted to DateTime via DateTime.from_unix!/1.

Types

t()

@type t() :: %Accrue.Connect.AccountLink{
  created: DateTime.t(),
  expires_at: DateTime.t(),
  object: String.t(),
  url: String.t()
}

Functions

from_stripe(struct)

@spec from_stripe(map() | struct()) :: t()

Projects a raw processor response (atom- or string-keyed map, or a bare processor struct unwrapped to map form) into a tightly-typed t(). Unix integer timestamps are converted to DateTime via DateTime.from_unix!/1.