Class: Stripe::Treasury::OutboundTransfer
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::Treasury::OutboundTransfer
- Extended by:
- APIOperations::Create, APIOperations::List
- Defined in:
- lib/stripe/resources/treasury/outbound_transfer.rb
Overview
Use [OutboundTransfers](docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](stripe.com/docs/api#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](docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers)
Defined Under Namespace
Classes: CancelParams, CreateParams, DestinationPaymentMethodDetails, FailParams, ListParams, NetworkDetails, PostParams, RetrieveParams, ReturnOutboundTransferParams, ReturnedDetails, StatusTransitions, TestHelpers, TrackingDetails, UpdateParams
Constant Summary collapse
- OBJECT_NAME =
"treasury.outbound_transfer"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Amount (in cents) transferred.
-
#cancelable ⇒ Object
readonly
Returns ‘true` if the object can be canceled, and `false` otherwise.
-
#created ⇒ Object
readonly
Time at which the object was created.
-
#currency ⇒ Object
readonly
Three-letter [ISO currency code](www.iso.org/iso-4217-currency-codes.html), in lowercase.
-
#description ⇒ Object
readonly
An arbitrary string attached to the object.
-
#destination_payment_method ⇒ Object
readonly
The PaymentMethod used as the payment instrument for an OutboundTransfer.
-
#destination_payment_method_details ⇒ Object
readonly
Attribute for field destination_payment_method_details.
-
#expected_arrival_date ⇒ Object
readonly
The date when funds are expected to arrive in the destination account.
-
#financial_account ⇒ Object
readonly
The FinancialAccount that funds were pulled from.
-
#hosted_regulatory_receipt_url ⇒ Object
readonly
A [hosted transaction receipt](stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe’s money transmission licenses.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#livemode ⇒ Object
readonly
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
-
#metadata ⇒ Object
readonly
Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object.
-
#network_details ⇒ Object
readonly
Details about the network used for the OutboundTransfer.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#returned_details ⇒ Object
readonly
Details about a returned OutboundTransfer.
-
#statement_descriptor ⇒ Object
readonly
Information about the OutboundTransfer to be sent to the recipient account.
-
#status ⇒ Object
readonly
Current status of the OutboundTransfer: ‘processing`, `failed`, `canceled`, `posted`, `returned`.
-
#status_transitions ⇒ Object
readonly
Attribute for field status_transitions.
-
#tracking_details ⇒ Object
readonly
Details about network-specific tracking information if available.
-
#transaction ⇒ Object
readonly
The Transaction associated with this object.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
-
.cancel(outbound_transfer, params = {}, opts = {}) ⇒ Object
An OutboundTransfer can be canceled if the funds have not yet been paid out.
-
.create(params = {}, opts = {}) ⇒ Object
Creates an OutboundTransfer.
-
.list(params = {}, opts = {}) ⇒ Object
Returns a list of OutboundTransfers sent from the specified FinancialAccount.
- .object_name ⇒ Object
Instance Method Summary collapse
-
#cancel(params = {}, opts = {}) ⇒ Object
An OutboundTransfer can be canceled if the funds have not yet been paid out.
- #test_helpers ⇒ Object
Methods included from APIOperations::Create
Methods included from APIOperations::List
Methods inherited from APIResource
class_name, custom_method, #refresh, #request_stripe_object, resource_url, #resource_url, retrieve, save_nested_resource
Methods included from APIOperations::Request
Methods inherited from StripeObject
#==, #[], #[]=, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values
Constructor Details
This class inherits a constructor from Stripe::StripeObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject
Instance Attribute Details
#amount ⇒ Object (readonly)
Amount (in cents) transferred.
365 366 367 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 365 def amount @amount end |
#cancelable ⇒ Object (readonly)
Returns ‘true` if the object can be canceled, and `false` otherwise.
367 368 369 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 367 def cancelable @cancelable end |
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
369 370 371 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 369 def created @created end |
#currency ⇒ Object (readonly)
Three-letter [ISO currency code](www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](stripe.com/docs/currencies).
371 372 373 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 371 def currency @currency end |
#description ⇒ Object (readonly)
An arbitrary string attached to the object. Often useful for displaying to users.
373 374 375 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 373 def description @description end |
#destination_payment_method ⇒ Object (readonly)
The PaymentMethod used as the payment instrument for an OutboundTransfer.
375 376 377 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 375 def destination_payment_method @destination_payment_method end |
#destination_payment_method_details ⇒ Object (readonly)
Attribute for field destination_payment_method_details
377 378 379 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 377 def destination_payment_method_details @destination_payment_method_details end |
#expected_arrival_date ⇒ Object (readonly)
The date when funds are expected to arrive in the destination account.
379 380 381 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 379 def expected_arrival_date @expected_arrival_date end |
#financial_account ⇒ Object (readonly)
The FinancialAccount that funds were pulled from.
381 382 383 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 381 def financial_account @financial_account end |
#hosted_regulatory_receipt_url ⇒ Object (readonly)
A [hosted transaction receipt](stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe’s money transmission licenses.
383 384 385 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 383 def hosted_regulatory_receipt_url @hosted_regulatory_receipt_url end |
#id ⇒ Object (readonly)
Unique identifier for the object.
385 386 387 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 385 def id @id end |
#livemode ⇒ Object (readonly)
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
387 388 389 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 387 def livemode @livemode end |
#metadata ⇒ Object (readonly)
Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
389 390 391 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 389 def @metadata end |
#network_details ⇒ Object (readonly)
Details about the network used for the OutboundTransfer.
391 392 393 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 391 def network_details @network_details end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
393 394 395 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 393 def object @object end |
#returned_details ⇒ Object (readonly)
Details about a returned OutboundTransfer. Only set when the status is ‘returned`.
395 396 397 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 395 def returned_details @returned_details end |
#statement_descriptor ⇒ Object (readonly)
Information about the OutboundTransfer to be sent to the recipient account.
397 398 399 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 397 def statement_descriptor @statement_descriptor end |
#status ⇒ Object (readonly)
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`.
399 400 401 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 399 def status @status end |
#status_transitions ⇒ Object (readonly)
Attribute for field status_transitions
401 402 403 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 401 def status_transitions @status_transitions end |
#tracking_details ⇒ Object (readonly)
Details about network-specific tracking information if available.
403 404 405 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 403 def tracking_details @tracking_details end |
#transaction ⇒ Object (readonly)
The Transaction associated with this object.
405 406 407 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 405 def transaction @transaction end |
Class Method Details
.cancel(outbound_transfer, params = {}, opts = {}) ⇒ Object
An OutboundTransfer can be canceled if the funds have not yet been paid out.
418 419 420 421 422 423 424 425 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 418 def self.cancel(outbound_transfer, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/treasury/outbound_transfers/%<outbound_transfer>s/cancel", { outbound_transfer: CGI.escape(outbound_transfer) }), params: params, opts: opts ) end |
.create(params = {}, opts = {}) ⇒ Object
Creates an OutboundTransfer.
428 429 430 431 432 433 434 435 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 428 def self.create(params = {}, opts = {}) request_stripe_object( method: :post, path: "/v1/treasury/outbound_transfers", params: params, opts: opts ) end |
.list(params = {}, opts = {}) ⇒ Object
Returns a list of OutboundTransfers sent from the specified FinancialAccount.
438 439 440 441 442 443 444 445 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 438 def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/treasury/outbound_transfers", params: params, opts: opts ) end |
.object_name ⇒ Object
16 17 18 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 16 def self.object_name "treasury.outbound_transfer" end |
Instance Method Details
#cancel(params = {}, opts = {}) ⇒ Object
An OutboundTransfer can be canceled if the funds have not yet been paid out.
408 409 410 411 412 413 414 415 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 408 def cancel(params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/treasury/outbound_transfers/%<outbound_transfer>s/cancel", { outbound_transfer: CGI.escape(self["id"]) }), params: params, opts: opts ) end |
#test_helpers ⇒ Object
447 448 449 |
# File 'lib/stripe/resources/treasury/outbound_transfer.rb', line 447 def test_helpers TestHelpers.new(self) end |