stripity_stripe v2.2.0 Stripe.Payout View Source
Work with Stripe payouts.
Stripe API reference: https://stripe.com/docs/api#payouts
Link to this section Summary
Link to this section Types
t() :: %Stripe.Payout{ amount: integer(), arrival_date: Stripe.timestamp(), automatic: boolean(), balance_transaction: Stripe.id() | Stripe.BalanceTransaction.t() | nil, created: Stripe.timestamp(), currency: String.t(), description: String.t() | nil, destination: Stripe.id() | Stripe.Card.t() | Stripe.BankAccount.t() | String.t() | nil, failure_balance_transaction: Stripe.id() | Stripe.BalanceTransaction.t() | nil, failure_code: String.t() | nil, failure_message: String.t() | nil, id: Stripe.id(), livemode: boolean(), metadata: Stripe.Types.metadata(), method: String.t(), object: String.t(), source_type: String.t(), statement_descriptor: String.t() | nil, status: String.t(), type: String.t() }
Link to this section Functions
cancel(Stripe.id() | t(), Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()}
Cancel a payout.
See the Stripe docs.
create(params, Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()} when params: %{ :amount => pos_integer(), :currency => String.t(), optional(:description) => String.t(), optional(:destination) => Stripe.id() | Stripe.Card.t() | Stripe.BankAccount.t() | String.t(), optional(:metadata) => Stripe.Types.metadata(), optional(:method) => String.t(), optional(:source_type) => String.t(), optional(:statement_descriptor) => String.t() } | %{}
Create a payout.
If your API key is in test mode, the supplied payment source (e.g., card) won’t actually be payoutd, though everything else will occur as if in live mode. (Stripe assumes that the payout would have completed successfully).
See the Stripe docs.
list(params, Stripe.options()) :: {:ok, Stripe.List.t(t())} | {:error, Stripe.Error.t()} when params: %{ optional(:arrival_date) => Stripe.date_query(), optional(:created) => Stripe.date_query(), optional(:destination) => String.t(), optional(:ending_before) => t() | Stripe.id(), optional(:limit) => 1..100, optional(:starting_after) => t() | Stripe.id(), optional(:status) => String.t() } | %{}
List all payouts.
Returns a list of payouts. The payouts are returned in sorted order, with the most recent payouts appearing first.
See the Stripe docs.
retrieve(Stripe.id() | t(), Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()}
Retrieve a payout.
See the Stripe docs.
update(Stripe.id() | t(), params, Stripe.options()) :: {:ok, t()} | {:error, Stripe.Error.t()} when params: %{optional(:metadata) => Stripe.Types.metadata()} | %{}
Update a payout.
Updates the specified payout by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
This request accepts only the :payout
or :metadata
.
The payout to be updated may either be passed in as a struct or an ID.
See the Stripe docs.