Req-first Elixir SDK for Dodo Payments.
Construct an explicit DodoPayments.Client and pass it as the first argument
to Dodo-named resource modules such as DodoPayments.CheckoutSessions,
DodoPayments.Payments, and DodoPayments.Subscriptions.
client =
DodoPayments.client!(
environment: :test,
api_key: System.fetch_env!("DODO_PAYMENTS_API_KEY")
)
DodoPayments.Products.list(client)No application-global API key or SDK-owned process is required.
Summary
Functions
Delegates to DodoPayments.Client.new/1.
Delegates to DodoPayments.Client.new!/1.
Number of classified merchant/public HTTP operations in this SDK.
Version of the audited official Dodo Payments SDK source surface.
Returns successful data or raises the returned SDK exception.
HTTP user-agent emitted by this SDK release.
Version of this Elixir SDK release.
Types
Functions
@spec client(keyword()) :: {:ok, DodoPayments.Client.t()} | {:error, DodoPayments.Error.ConfigurationError.t()}
Delegates to DodoPayments.Client.new/1.
@spec client!(keyword()) :: DodoPayments.Client.t()
Delegates to DodoPayments.Client.new!/1.
@spec operation_count() :: pos_integer()
Number of classified merchant/public HTTP operations in this SDK.
@spec source_sdk_version() :: String.t()
Version of the audited official Dodo Payments SDK source surface.
@spec unwrap!({:ok, value} | {:error, Exception.t()}) :: value when value: term()
Returns successful data or raises the returned SDK exception.
iex> DodoPayments.unwrap!({:ok, :paid})
:paid
@spec user_agent() :: String.t()
HTTP user-agent emitted by this SDK release.
@spec version() :: String.t()
Version of this Elixir SDK release.