Wire-level description of a Dodo Payments operation.
Operations are data rather than transport code. Keeping the catalogue explicit gives the request engine one authoritative place to make authentication, replay, remote-consequence, pagination and decoding decisions. Replayability answers whether an identical request may be repeated; consequence classification answers whether an ambiguous result needs reconciliation.
Summary
Functions
Returns every operation in stable catalogue order.
Returns an operation, raising for an SDK-internal unknown identifier.
Validates input, expands path variables and separates query/body data.
Expands {name} variables using URL-encoded values from the input map.
Types
@type auth() :: :merchant | :public
@type pagination() :: nil | %{kind: :page_number, initial: non_neg_integer()} | %{kind: :cursor}
@type response_mode() :: :json | :empty | :binary | :pdf | :csv
@type t() :: %DodoPayments.Operation{ auth: auth(), body_field: atom() | nil, consequential: boolean(), id: atom(), input: :none | :body | :query, item_schema: item_schema(), method: :get | :post | :put | :patch | :delete, pagination: pagination(), path: String.t(), path_params: [atom()], reconciliation: String.t() | nil, replay: replay(), required: [atom()], response_mode: response_mode(), response_schema: module() | nil, success_statuses: [pos_integer()], validator: atom() | nil }
Functions
@spec all() :: [t()]
Returns every operation in stable catalogue order.
Returns an operation, raising for an SDK-internal unknown identifier.
@spec prepare(t(), map() | nil) :: {:ok, %{path: String.t(), body: map() | nil, query: map()}} | {:error, Exception.t()}
Validates input, expands path variables and separates query/body data.
@spec render_path(t(), map()) :: {:ok, String.t()} | {:error, Exception.t()}
Expands {name} variables using URL-encoded values from the input map.