MollieEx.Capture (mollie_ex v0.4.0)

Copy Markdown View Source

Capture resource returned by the Mollie API.

Stable fields are exposed as snake_case struct fields. The original decoded Mollie response is preserved in raw with upstream JSON casing unchanged.

Summary

Functions

Returns true when the capture status is failed.

Returns true when the capture status is pending.

Returns true when the capture status is succeeded.

Types

links()

@type links() :: %{optional(String.t()) => MollieEx.Types.Link.t() | term()}

t()

@type t() :: %MollieEx.Capture{
  amount: MollieEx.Types.Money.t() | nil,
  created_at: String.t() | nil,
  description: String.t() | nil,
  id: String.t(),
  links: links(),
  metadata: term(),
  mode: String.t() | nil,
  payment_id: String.t() | nil,
  raw: map(),
  resource: String.t() | nil,
  settlement_amount: MollieEx.Types.Money.t() | nil,
  settlement_id: String.t() | nil,
  shipment_id: String.t() | nil,
  status: String.t() | nil
}

Functions

failed?(capture)

@spec failed?(t() | term()) :: boolean()

Returns true when the capture status is failed.

pending?(capture)

@spec pending?(t() | term()) :: boolean()

Returns true when the capture status is pending.

succeeded?(capture)

@spec succeeded?(t() | term()) :: boolean()

Returns true when the capture status is succeeded.