MollieEx.Subscription (mollie_ex v0.4.0)

Copy Markdown View Source

Subscription 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 subscription status is active.

Returns true when the subscription status is canceled.

Types

links()

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

t()

(since 0.4.0)
@type t() :: %MollieEx.Subscription{
  amount: MollieEx.Types.Money.t() | nil,
  application_fee: term(),
  canceled_at: String.t() | nil,
  created_at: String.t() | nil,
  customer_id: String.t() | nil,
  description: String.t() | nil,
  id: String.t(),
  interval: String.t() | nil,
  links: links(),
  mandate_id: String.t() | nil,
  metadata: term(),
  method: String.t() | nil,
  mode: String.t() | nil,
  next_payment_date: String.t() | nil,
  raw: map(),
  resource: String.t() | nil,
  start_date: String.t() | nil,
  status: String.t() | nil,
  times: integer() | nil,
  times_remaining: integer() | nil,
  webhook_url: String.t() | nil
}

Functions

active?(subscription)

(since 0.4.0)
@spec active?(t() | term()) :: boolean()

Returns true when the subscription status is active.

canceled?(subscription)

(since 0.4.0)
@spec canceled?(t() | term()) :: boolean()

Returns true when the subscription status is canceled.