lib/ory/model/verification_flow.ex

# NOTE: This file is auto generated by OpenAPI Generator 7.2.0 (https://openapi-generator.tech).
# Do not edit this file manually.

defmodule Ory.Model.VerificationFlow do
  @moduledoc """
  Used to verify an out-of-band communication channel such as an email address or a phone number.  For more information head over to: https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation
  """

  @derive Jason.Encoder
  defstruct [
    :active,
    :expires_at,
    :id,
    :issued_at,
    :request_url,
    :return_to,
    :state,
    :type,
    :ui
  ]

  @type t :: %__MODULE__{
    :active => String.t | nil,
    :expires_at => DateTime.t | nil,
    :id => String.t,
    :issued_at => DateTime.t | nil,
    :request_url => String.t | nil,
    :return_to => String.t | nil,
    :state => any() | nil,
    :type => String.t,
    :ui => Ory.Model.UiContainer.t
  }

  alias Ory.Deserializer

  def decode(value) do
    value
     |> Deserializer.deserialize(:expires_at, :datetime, nil)
     |> Deserializer.deserialize(:issued_at, :datetime, nil)
     |> Deserializer.deserialize(:ui, :struct, Ory.Model.UiContainer)
  end
end