Current section
Files
Jump to
Current section
Files
lib/polarex/schemas/payment_method_card_metadata.ex
defmodule Polarex.PaymentMethodCardMetadata do
@moduledoc """
Provides struct and type for a PaymentMethodCardMetadata
"""
@type t :: %__MODULE__{
brand: String.t(),
exp_month: integer,
exp_year: integer,
last4: String.t(),
wallet: String.t() | nil
}
defstruct [:brand, :exp_month, :exp_year, :last4, :wallet]
@doc false
@spec __fields__(atom) :: keyword
def __fields__(type \\ :t)
def __fields__(:t) do
[
brand: :string,
exp_month: :integer,
exp_year: :integer,
last4: :string,
wallet: {:union, [:string, :null]}
]
end
end