View Source Numscriptex.Posting (numscriptex v0.2.6)

Numscriptex.Postings represents a financial transaction made with Numscript

Summary

Types

t()

Type that represents Numscriptex.Posting struct.

Types

t()

@type t() :: %Numscriptex.Posting{
  amount: pos_integer(),
  asset: bitstring(),
  decimal_amount: float(),
  destination: bitstring(),
  source: bitstring()
}

Type that represents Numscriptex.Posting struct.

Fields

  • :source account whose the money came from
  • :asset the asset were the transaction was made
  • :destination account whose the money will go to
  • :amount amount of money transferred (integer)
  • :decimal_amount amount of money transferred, but as float

Functions

from_list(postings)

@spec from_list([map()]) :: [t()]

from_map(posting)

@spec from_map(map()) :: t()