Class: Stripe::Treasury::OutboundPayment
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::Treasury::OutboundPayment
- Extended by:
- APIOperations::Create, APIOperations::List
- Defined in:
- lib/stripe/resources/treasury/outbound_payment.rb
Overview
Use [OutboundPayments](docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party’s external bank account or [FinancialAccount](stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](stripe.com/docs/api#outbound_transfers).
Simulate OutboundPayment state changes with the ‘/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects.
Related guide: [Moving money with Treasury using OutboundPayment objects](docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments)
Defined Under Namespace
Classes: CancelParams, CreateParams, DestinationPaymentMethodDetails, EndUserDetails, FailParams, ListParams, PostParams, ReturnOutboundPaymentParams, ReturnedDetails, StatusTransitions, TestHelpers, TrackingDetails, UpdateParams
Constant Summary collapse
- OBJECT_NAME =
"treasury.outbound_payment"
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.
-
#customer ⇒ Object
readonly
ID of the [customer](stripe.com/docs/api/customers) to whom an OutboundPayment is sent.
-
#description ⇒ Object
readonly
An arbitrary string attached to the object.
-
#destination_payment_method ⇒ Object
readonly
The PaymentMethod via which an OutboundPayment is sent.
-
#destination_payment_method_details ⇒ Object
readonly
Details about the PaymentMethod for an OutboundPayment.
-
#end_user_details ⇒ Object
readonly
Details about the end user.
-
#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.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#returned_details ⇒ Object
readonly
Details about a returned OutboundPayment.
-
#statement_descriptor ⇒ Object
readonly
The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer).
-
#status ⇒ Object
readonly
Current status of the OutboundPayment: ‘processing`, `failed`, `posted`, `returned`, `canceled`.
-
#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(id, params = {}, opts = {}) ⇒ Object
Cancel an OutboundPayment.
-
.create(params = {}, opts = {}) ⇒ Object
Creates an OutboundPayment.
- .field_remappings ⇒ Object
- .inner_class_types ⇒ Object
-
.list(params = {}, opts = {}) ⇒ Object
Returns a list of OutboundPayments sent from the specified FinancialAccount.
- .object_name ⇒ Object
Instance Method Summary collapse
-
#cancel(params = {}, opts = {}) ⇒ Object
Cancel an OutboundPayment.
- #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
#==, #[], #[]=, #_get_inner_class_type, 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.
554 555 556 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 554 def amount @amount end |
#cancelable ⇒ Object (readonly)
Returns ‘true` if the object can be canceled, and `false` otherwise.
556 557 558 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 556 def cancelable @cancelable end |
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
558 559 560 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 558 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).
560 561 562 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 560 def currency @currency end |
#customer ⇒ Object (readonly)
ID of the [customer](stripe.com/docs/api/customers) to whom an OutboundPayment is sent.
562 563 564 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 562 def customer @customer end |
#description ⇒ Object (readonly)
An arbitrary string attached to the object. Often useful for displaying to users.
564 565 566 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 564 def description @description end |
#destination_payment_method ⇒ Object (readonly)
The PaymentMethod via which an OutboundPayment is sent. This field can be empty if the OutboundPayment was created using ‘destination_payment_method_data`.
566 567 568 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 566 def destination_payment_method @destination_payment_method end |
#destination_payment_method_details ⇒ Object (readonly)
Details about the PaymentMethod for an OutboundPayment.
568 569 570 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 568 def destination_payment_method_details @destination_payment_method_details end |
#end_user_details ⇒ Object (readonly)
Details about the end user.
570 571 572 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 570 def end_user_details @end_user_details end |
#expected_arrival_date ⇒ Object (readonly)
The date when funds are expected to arrive in the destination account.
572 573 574 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 572 def expected_arrival_date @expected_arrival_date end |
#financial_account ⇒ Object (readonly)
The FinancialAccount that funds were pulled from.
574 575 576 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 574 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.
576 577 578 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 576 def hosted_regulatory_receipt_url @hosted_regulatory_receipt_url end |
#id ⇒ Object (readonly)
Unique identifier for the object.
578 579 580 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 578 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.
580 581 582 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 580 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.
582 583 584 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 582 def @metadata end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
584 585 586 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 584 def object @object end |
#returned_details ⇒ Object (readonly)
Details about a returned OutboundPayment. Only set when the status is ‘returned`.
586 587 588 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 586 def returned_details @returned_details end |
#statement_descriptor ⇒ Object (readonly)
The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer).
588 589 590 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 588 def statement_descriptor @statement_descriptor end |
#status ⇒ Object (readonly)
Current status of the OutboundPayment: ‘processing`, `failed`, `posted`, `returned`, `canceled`. An OutboundPayment is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundPayment has been “confirmed” and funds have left the account, or to `failed` or `canceled`. If an OutboundPayment fails to arrive at its destination, its status will change to `returned`.
590 591 592 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 590 def status @status end |
#status_transitions ⇒ Object (readonly)
Attribute for field status_transitions
592 593 594 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 592 def status_transitions @status_transitions end |
#tracking_details ⇒ Object (readonly)
Details about network-specific tracking information if available.
594 595 596 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 594 def tracking_details @tracking_details end |
#transaction ⇒ Object (readonly)
The Transaction associated with this object.
596 597 598 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 596 def transaction @transaction end |
Class Method Details
.cancel(id, params = {}, opts = {}) ⇒ Object
Cancel an OutboundPayment.
609 610 611 612 613 614 615 616 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 609 def self.cancel(id, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/treasury/outbound_payments/%<id>s/cancel", { id: CGI.escape(id) }), params: params, opts: opts ) end |
.create(params = {}, opts = {}) ⇒ Object
Creates an OutboundPayment.
619 620 621 622 623 624 625 626 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 619 def self.create(params = {}, opts = {}) request_stripe_object( method: :post, path: "/v1/treasury/outbound_payments", params: params, opts: opts ) end |
.field_remappings ⇒ Object
739 740 741 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 739 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
729 730 731 732 733 734 735 736 737 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 729 def self.inner_class_types @inner_class_types = { destination_payment_method_details: DestinationPaymentMethodDetails, end_user_details: EndUserDetails, returned_details: ReturnedDetails, status_transitions: StatusTransitions, tracking_details: TrackingDetails, } end |
.list(params = {}, opts = {}) ⇒ Object
Returns a list of OutboundPayments sent from the specified FinancialAccount.
629 630 631 632 633 634 635 636 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 629 def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/treasury/outbound_payments", params: params, opts: opts ) end |
.object_name ⇒ Object
16 17 18 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 16 def self.object_name "treasury.outbound_payment" end |
Instance Method Details
#cancel(params = {}, opts = {}) ⇒ Object
Cancel an OutboundPayment.
599 600 601 602 603 604 605 606 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 599 def cancel(params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/treasury/outbound_payments/%<id>s/cancel", { id: CGI.escape(self["id"]) }), params: params, opts: opts ) end |
#test_helpers ⇒ Object
638 639 640 |
# File 'lib/stripe/resources/treasury/outbound_payment.rb', line 638 def test_helpers TestHelpers.new(self) end |