lib/vr_chat/model/transaction.ex

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

defmodule VRChat.Model.Transaction do
  @moduledoc """
  
  """

  @derive [Poison.Encoder]
  defstruct [
    :id,
    :status,
    :subscription,
    :sandbox,
    :created_at,
    :updated_at,
    :steam,
    :agreement,
    :error
  ]

  @type t :: %__MODULE__{
    :id => String.t,
    :status => VRChat.Model.TransactionStatus.t,
    :subscription => VRChat.Model.Subscription.t,
    :sandbox => boolean(),
    :created_at => DateTime.t,
    :updated_at => DateTime.t,
    :steam => VRChat.Model.TransactionSteamInfo.t | nil,
    :agreement => VRChat.Model.TransactionAgreement.t | nil,
    :error => String.t
  }
end

defimpl Poison.Decoder, for: VRChat.Model.Transaction do
  import VRChat.Deserializer
  def decode(value, options) do
    value
    |> deserialize(:status, :struct, VRChat.Model.TransactionStatus, options)
    |> deserialize(:subscription, :struct, VRChat.Model.Subscription, options)
    |> deserialize(:steam, :struct, VRChat.Model.TransactionSteamInfo, options)
    |> deserialize(:agreement, :struct, VRChat.Model.TransactionAgreement, options)
  end
end