Builds the shared Req request pipeline used by every resource module
(BankingCircle.Payments, BankingCircle.Accounts, ...), and exposes
request/2 as the single choke point through which all API traffic
flows — this is where auth injection, retries, telemetry, and error
normalization all compose.
Summary
Functions
Issues a request through the shared pipeline: attaches a fresh/cached
bearer token, emits [:banking_circle, :request, :start | :stop | :exception]
telemetry, and normalizes any failure into BankingCircle.Error.
Functions
@spec build(BankingCircle.Config.t()) :: Req.Request.t()
@spec request( Req.Request.t(), keyword() ) :: {:ok, term()} | {:error, BankingCircle.Error.t()}
Issues a request through the shared pipeline: attaches a fresh/cached
bearer token, emits [:banking_circle, :request, :start | :stop | :exception]
telemetry, and normalizes any failure into BankingCircle.Error.
Returns {:ok, decoded_body} on 2xx, {:error, %BankingCircle.Error{}}
otherwise.