View Source Stripe.Treasury.Transaction (stripity_stripe v3.2.0)

Transactions represent changes to a FinancialAccount's balance.

Summary

Types

t()

The treasury.transaction type.

Functions

Retrieves a list of Transaction objects.

Retrieves the details of an existing Transaction.

Types

@type created() :: %{
  optional(:gt) => integer(),
  optional(:gte) => integer(),
  optional(:lt) => integer(),
  optional(:lte) => integer()
}
@type posted_at() :: %{
  optional(:gt) => integer(),
  optional(:gte) => integer(),
  optional(:lt) => integer(),
  optional(:lte) => integer()
}
@type status_transitions() :: %{optional(:posted_at) => posted_at() | integer()}
@type t() :: %Stripe.Treasury.Transaction{
  amount: integer(),
  balance_impact: term(),
  created: integer(),
  currency: binary(),
  description: binary(),
  entries: term() | nil,
  financial_account: binary(),
  flow: binary() | nil,
  flow_details: term() | nil,
  flow_type: binary(),
  id: binary(),
  livemode: boolean(),
  object: binary(),
  status: binary(),
  status_transitions: term()
}

The treasury.transaction type.

  • amount Amount (in cents) transferred.
  • balance_impact
  • created Time at which the object was created. Measured in seconds since the Unix epoch.
  • currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
  • description An arbitrary string attached to the object. Often useful for displaying to users.
  • entries A list of TransactionEntries that are part of this Transaction. This cannot be expanded in any list endpoints.
  • financial_account The FinancialAccount associated with this object.
  • flow ID of the flow that created the Transaction.
  • flow_details Details of the flow that created the Transaction.
  • flow_type Type of the flow that created the Transaction.
  • id Unique identifier for the object.
  • livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
  • object String representing the object's type. Objects of the same type share the same value.
  • status Status of the Transaction.
  • status_transitions

Functions

Link to this function

list(params \\ %{}, opts \\ [])

View Source
@spec list(
  params :: %{
    optional(:created) => created() | integer(),
    optional(:ending_before) => binary(),
    optional(:expand) => [binary()],
    optional(:financial_account) => binary(),
    optional(:limit) => integer(),
    optional(:order_by) => :created | :posted_at,
    optional(:starting_after) => binary(),
    optional(:status) => :open | :posted | :void,
    optional(:status_transitions) => status_transitions()
  },
  opts :: Keyword.t()
) ::
  {:ok, Stripe.List.t(t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Retrieves a list of Transaction objects.

Details

  • Method: get
  • Path: /v1/treasury/transactions
Link to this function

retrieve(id, params \\ %{}, opts \\ [])

View Source
@spec retrieve(
  id :: binary(),
  params :: %{optional(:expand) => [binary()]},
  opts :: Keyword.t()
) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Retrieves the details of an existing Transaction.

Details

  • Method: get
  • Path: /v1/treasury/transactions/{id}