Plaid.Client.Request (plaid v3.0.0) View Source

Data structure for an HTTP request with convenience functions.

Link to this section Summary

Functions

Add telemetry metadata to Request.

Convert Request to options format passed to Tesla.request/2.

Link to this section Types

Specs

t() :: %Plaid.Client.Request{
  body: map(),
  endpoint: String.t(),
  method: atom(),
  opts: map()
}

Link to this section Functions

Link to this function

add_metadata(request, config \\ %{})

View Source

Specs

add_metadata(t(), map()) :: t()

Add telemetry metadata to Request.

Calling without the second argument adds default metadata. Custom metadata is added by passing a map with a key telemetry_metadata.

Example

Request.add_metadata(request, %{telemetry_metadata: %{ins_id: "ins_1"}})

Specs

to_options(t()) :: keyword()

Convert Request to options format passed to Tesla.request/2.