Inttegro.Payments.Payment (inttegro v0.2.0)

Copy Markdown View Source

Represents Payment data in the Payments API.

Inttegro decodes API responses into this struct. Required fields are always present; optional fields are nil when they do not apply or were not returned. Follow the linked types in t/0 for nested domain values.

Payment state, attempts, confirmations, and next actions attached to orders.

Summary

Types

t()

The decoded payment value.

Functions

Builds a Inttegro.Payments.Payment and raises KeyError when a required field is missing.

Types

t()

@type t() :: %Inttegro.Payments.Payment{
  amount: Inttegro.Money.Amount.t(),
  balance_transaction:
    Inttegro.BalanceTransactions.BalanceTransaction.t() | nil,
  canceled_at: String.t() | nil,
  due_at: String.t() | nil,
  executed_at: String.t() | nil,
  expired_at: String.t() | nil,
  failed_at: String.t() | nil,
  id: String.t(),
  initiated_at: String.t(),
  latest_attempt: Inttegro.Payments.Attempt.t() | nil,
  next_action: Inttegro.Payments.NextAction.t() | nil,
  paid_at: String.t() | nil,
  paid_offline: boolean() | nil,
  payment_method: Inttegro.PaymentMethods.Snapshot.t() | nil,
  payment_method_types: [String.t()] | nil,
  payout_configuration: Inttegro.Payments.PayoutConfiguration.t() | nil,
  statement_descriptor: String.t(),
  status: Inttegro.Payments.Status.t()
}

The decoded payment value.

Functions

new!(attrs \\ %{})

@spec new!(map() | keyword()) :: t()

Builds a Inttegro.Payments.Payment and raises KeyError when a required field is missing.