Inttegro.Otp.Transaction (inttegro v0.2.0)

Copy Markdown View Source

Represents Transaction data in the Otp 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.

Initiates, verifies, and inspects one-time passcode transactions.

OTP delivery and verification are separate steps. Initiation returning successfully means the transaction was accepted, not that the recipient received or verified the code. Keep the returned transaction ID and submit the user-provided code through verify/3.

Summary

Types

t()

The decoded transaction value.

Functions

Builds a Inttegro.Otp.Transaction and raises KeyError when a required field is missing.

Types

t()

@type t() :: %Inttegro.Otp.Transaction{
  cancel_reason: String.t() | nil,
  canceled_at: String.t() | nil,
  expires_at: String.t(),
  full_message: String.t(),
  id: String.t(),
  initiated_at: String.t(),
  status: Inttegro.Otp.Status.t(),
  transmission: Inttegro.Otp.Transmission.t() | nil
}

The decoded transaction value.

Functions

new!(attrs \\ %{})

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

Builds a Inttegro.Otp.Transaction and raises KeyError when a required field is missing.