Packages

Complete Stripe SDK for Elixir with parity to the official Ruby SDK. V1+V2 coverage (193 services, 320 resource structs, 525 documented params). Per-event modules, Finch HTTP/2, RustyJSON, automatic retries, OAuth, webhooks, telemetry, per-client config, streaming pagination.

Current section

Files

Jump to
tiger_stripe lib stripe resources treasury outbound_transfer.ex
Raw

lib/stripe/resources/treasury/outbound_transfer.ex

# File generated from our OpenAPI spec
defmodule Stripe.Resources.Treasury.OutboundTransfer do
@moduledoc """
TreasuryOutboundTransfersResourceOutboundTransfer
Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://api.stripe.com#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://api.stripe.com#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account.
Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects.
Related guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers)
"""
@typedoc """
* `amount` - Amount (in cents) transferred.
* `cancelable` - Returns `true` if the object can be canceled, and `false` otherwise.
* `created` - Time at which the object was created. Measured in seconds since the Unix epoch. Format: Unix timestamp.
* `currency` - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Format: ISO 4217 currency code.
* `description` - An arbitrary string attached to the object. Often useful for displaying to users. Max length: 5000. Nullable.
* `destination_payment_method` - The PaymentMethod used as the payment instrument for an OutboundTransfer. Max length: 5000. Nullable.
* `destination_payment_method_details` - Expandable.
* `expected_arrival_date` - The date when funds are expected to arrive in the destination account. Format: Unix timestamp.
* `financial_account` - The FinancialAccount that funds were pulled from. Max length: 5000.
* `hosted_regulatory_receipt_url` - A [hosted transaction receipt](https://docs.stripe.com/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. Max length: 5000. Nullable.
* `id` - Unique identifier for the object. Max length: 5000.
* `livemode` - Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
* `metadata` - Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
* `object` - String representing the object's type. Objects of the same type share the same value. Possible values: `treasury.outbound_transfer`.
* `returned_details` - Details about a returned OutboundTransfer. Only set when the status is `returned`. Nullable. Expandable.
* `statement_descriptor` - Information about the OutboundTransfer to be sent to the recipient account. Max length: 5000.
* `status` - Current status of the OutboundTransfer: `processing`, `failed`, `canceled`, `posted`, `returned`. An OutboundTransfer is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundTransfer has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundTransfer fails to arrive at its destination, its status will change to `returned`. Possible values: `canceled`, `failed`, `posted`, `processing`, `returned`.
* `status_transitions` - Expandable.
* `tracking_details` - Details about network-specific tracking information if available. Nullable. Expandable.
* `transaction` - The Transaction associated with this object. Expandable.
"""
@type t :: %__MODULE__{
amount: integer(),
cancelable: boolean(),
created: integer(),
currency: String.t(),
description: String.t(),
destination_payment_method: String.t(),
destination_payment_method_details:
Stripe.Resources.DestinationPaymentMethodDetails.t(),
expected_arrival_date: integer(),
financial_account: String.t(),
hosted_regulatory_receipt_url: String.t(),
id: String.t(),
livemode: boolean(),
metadata: map(),
object: String.t(),
returned_details: Stripe.Resources.ReturnedDetails.t(),
statement_descriptor: String.t(),
status: String.t(),
status_transitions: Stripe.Resources.StatusTransitions.t(),
tracking_details: __MODULE__.TrackingDetails.t(),
transaction: String.t() | Stripe.Resources.Treasury.Transaction.t()
}
defstruct [
:amount,
:cancelable,
:created,
:currency,
:description,
:destination_payment_method,
:destination_payment_method_details,
:expected_arrival_date,
:financial_account,
:hosted_regulatory_receipt_url,
:id,
:livemode,
:metadata,
:object,
:returned_details,
:statement_descriptor,
:status,
:status_transitions,
:tracking_details,
:transaction
]
@object_name "treasury.outbound_transfer"
def object_name, do: @object_name
def expandable_fields,
do: [
"destination_payment_method_details",
"returned_details",
"status_transitions",
"tracking_details",
"transaction"
]
defmodule TrackingDetails do
@moduledoc "Nested struct within the parent resource."
@typedoc """
* `ach`
* `type` - The US bank account network used to send funds. Possible values: `ach`, `us_domestic_wire`.
* `us_domestic_wire`
"""
@type t :: %__MODULE__{
ach: __MODULE__.Ach.t() | nil,
type: String.t() | nil,
us_domestic_wire: __MODULE__.UsDomesticWire.t() | nil
}
defstruct [:ach, :type, :us_domestic_wire]
defmodule Ach do
@moduledoc "Nested struct within the parent resource."
@typedoc """
* `trace_id` - ACH trace ID of the OutboundTransfer for transfers sent over the `ach` network. Max length: 5000.
"""
@type t :: %__MODULE__{
trace_id: String.t() | nil
}
defstruct [:trace_id]
end
defmodule UsDomesticWire do
@moduledoc "Nested struct within the parent resource."
@typedoc """
* `chips` - CHIPS System Sequence Number (SSN) of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. Max length: 5000. Nullable.
* `imad` - IMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. Max length: 5000. Nullable.
* `omad` - OMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. Max length: 5000. Nullable.
"""
@type t :: %__MODULE__{
chips: String.t() | nil,
imad: String.t() | nil,
omad: String.t() | nil
}
defstruct [:chips, :imad, :omad]
end
def __inner_types__ do
%{
"ach" => __MODULE__.Ach,
"us_domestic_wire" => __MODULE__.UsDomesticWire
}
end
end
def __inner_types__ do
%{
"destination_payment_method_details" => Stripe.Resources.DestinationPaymentMethodDetails,
"returned_details" => Stripe.Resources.ReturnedDetails,
"status_transitions" => Stripe.Resources.StatusTransitions,
"tracking_details" => __MODULE__.TrackingDetails
}
end
end