Class: Stripe::Treasury::InboundTransfer
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::Treasury::InboundTransfer
- Extended by:
- APIOperations::Create, APIOperations::List
- Defined in:
- lib/stripe/resources/treasury/inbound_transfer.rb
Overview
Use [InboundTransfers](docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit.
Related guide: [Moving money with Treasury using InboundTransfer objects](docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers)
Defined Under Namespace
Classes: FailureDetails, LinkedFlows, OriginPaymentMethodDetails, StatusTransitions, TestHelpers
Constant Summary collapse
- OBJECT_NAME =
"treasury.inbound_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 InboundTransfer is able to be canceled.
-
#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.
-
#failure_details ⇒ Object
readonly
Details about this InboundTransfer’s failure.
-
#financial_account ⇒ Object
readonly
The FinancialAccount that received the funds.
-
#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.
-
#linked_flows ⇒ Object
readonly
Attribute for field linked_flows.
-
#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.
-
#origin_payment_method ⇒ Object
readonly
The origin payment method to be debited for an InboundTransfer.
-
#origin_payment_method_details ⇒ Object
readonly
Details about the PaymentMethod for an InboundTransfer.
-
#returned ⇒ Object
readonly
Returns ‘true` if the funds for an InboundTransfer were returned after the InboundTransfer went to the `succeeded` state.
-
#statement_descriptor ⇒ Object
readonly
Statement descriptor shown when funds are debited from the source.
-
#status ⇒ Object
readonly
Status of the InboundTransfer: ‘processing`, `succeeded`, `failed`, and `canceled`.
-
#status_transitions ⇒ Object
readonly
Attribute for field status_transitions.
-
#transaction ⇒ Object
readonly
The Transaction associated with this object.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
-
.cancel(inbound_transfer, params = {}, opts = {}) ⇒ Object
Cancels an InboundTransfer.
-
.create(params = {}, opts = {}) ⇒ Object
Creates an InboundTransfer.
-
.list(filters = {}, opts = {}) ⇒ Object
Returns a list of InboundTransfers sent from the specified FinancialAccount.
- .object_name ⇒ Object
Instance Method Summary collapse
-
#cancel(params = {}, opts = {}) ⇒ Object
Cancels an InboundTransfer.
- #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.
44 45 46 |
# File 'lib/stripe/resources/treasury/inbound_transfer.rb', line 44 def amount @amount end |
#cancelable ⇒ Object (readonly)
Returns ‘true` if the InboundTransfer is able to be canceled.
46 47 48 |
# File 'lib/stripe/resources/treasury/inbound_transfer.rb', line 46 def cancelable @cancelable end |
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
48 49 50 |
# File 'lib/stripe/resources/treasury/inbound_transfer.rb', line 48 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).
50 51 52 |
# File 'lib/stripe/resources/treasury/inbound_transfer.rb', line 50 def currency @currency end |
#description ⇒ Object (readonly)
An arbitrary string attached to the object. Often useful for displaying to users.
52 53 54 |
# File 'lib/stripe/resources/treasury/inbound_transfer.rb', line 52 def description @description end |
#failure_details ⇒ Object (readonly)
Details about this InboundTransfer’s failure. Only set when status is ‘failed`.
54 55 56 |
# File 'lib/stripe/resources/treasury/inbound_transfer.rb', line 54 def failure_details @failure_details end |
#financial_account ⇒ Object (readonly)
The FinancialAccount that received the funds.
56 57 58 |
# File 'lib/stripe/resources/treasury/inbound_transfer.rb', line 56 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.
58 59 60 |
# File 'lib/stripe/resources/treasury/inbound_transfer.rb', line 58 def hosted_regulatory_receipt_url @hosted_regulatory_receipt_url end |
#id ⇒ Object (readonly)
Unique identifier for the object.
60 61 62 |
# File 'lib/stripe/resources/treasury/inbound_transfer.rb', line 60 def id @id end |
#linked_flows ⇒ Object (readonly)
Attribute for field linked_flows
62 63 64 |
# File 'lib/stripe/resources/treasury/inbound_transfer.rb', line 62 def linked_flows @linked_flows 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.
64 65 66 |
# File 'lib/stripe/resources/treasury/inbound_transfer.rb', line 64 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.
66 67 68 |
# File 'lib/stripe/resources/treasury/inbound_transfer.rb', line 66 def @metadata end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
68 69 70 |
# File 'lib/stripe/resources/treasury/inbound_transfer.rb', line 68 def object @object end |
#origin_payment_method ⇒ Object (readonly)
The origin payment method to be debited for an InboundTransfer.
70 71 72 |
# File 'lib/stripe/resources/treasury/inbound_transfer.rb', line 70 def origin_payment_method @origin_payment_method end |
#origin_payment_method_details ⇒ Object (readonly)
Details about the PaymentMethod for an InboundTransfer.
72 73 74 |
# File 'lib/stripe/resources/treasury/inbound_transfer.rb', line 72 def origin_payment_method_details @origin_payment_method_details end |
#returned ⇒ Object (readonly)
Returns ‘true` if the funds for an InboundTransfer were returned after the InboundTransfer went to the `succeeded` state.
74 75 76 |
# File 'lib/stripe/resources/treasury/inbound_transfer.rb', line 74 def returned @returned end |
#statement_descriptor ⇒ Object (readonly)
Statement descriptor shown when funds are debited from the source. Not all payment networks support ‘statement_descriptor`.
76 77 78 |
# File 'lib/stripe/resources/treasury/inbound_transfer.rb', line 76 def statement_descriptor @statement_descriptor end |
#status ⇒ Object (readonly)
Status of the InboundTransfer: ‘processing`, `succeeded`, `failed`, and `canceled`. An InboundTransfer is `processing` if it is created and pending. The status changes to `succeeded` once the funds have been “confirmed” and a `transaction` is created and posted. The status changes to `failed` if the transfer fails.
78 79 80 |
# File 'lib/stripe/resources/treasury/inbound_transfer.rb', line 78 def status @status end |
#status_transitions ⇒ Object (readonly)
Attribute for field status_transitions
80 81 82 |
# File 'lib/stripe/resources/treasury/inbound_transfer.rb', line 80 def status_transitions @status_transitions end |
#transaction ⇒ Object (readonly)
The Transaction associated with this object.
82 83 84 |
# File 'lib/stripe/resources/treasury/inbound_transfer.rb', line 82 def transaction @transaction end |
Class Method Details
.cancel(inbound_transfer, params = {}, opts = {}) ⇒ Object
Cancels an InboundTransfer.
95 96 97 98 99 100 101 102 |
# File 'lib/stripe/resources/treasury/inbound_transfer.rb', line 95 def self.cancel(inbound_transfer, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/treasury/inbound_transfers/%<inbound_transfer>s/cancel", { inbound_transfer: CGI.escape(inbound_transfer) }), params: params, opts: opts ) end |
.create(params = {}, opts = {}) ⇒ Object
Creates an InboundTransfer.
105 106 107 108 109 110 111 112 |
# File 'lib/stripe/resources/treasury/inbound_transfer.rb', line 105 def self.create(params = {}, opts = {}) request_stripe_object( method: :post, path: "/v1/treasury/inbound_transfers", params: params, opts: opts ) end |
.list(filters = {}, opts = {}) ⇒ Object
Returns a list of InboundTransfers sent from the specified FinancialAccount.
115 116 117 118 119 120 121 122 |
# File 'lib/stripe/resources/treasury/inbound_transfer.rb', line 115 def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/treasury/inbound_transfers", params: filters, opts: opts ) end |
.object_name ⇒ Object
14 15 16 |
# File 'lib/stripe/resources/treasury/inbound_transfer.rb', line 14 def self.object_name "treasury.inbound_transfer" end |
Instance Method Details
#cancel(params = {}, opts = {}) ⇒ Object
Cancels an InboundTransfer.
85 86 87 88 89 90 91 92 |
# File 'lib/stripe/resources/treasury/inbound_transfer.rb', line 85 def cancel(params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/treasury/inbound_transfers/%<inbound_transfer>s/cancel", { inbound_transfer: CGI.escape(self["id"]) }), params: params, opts: opts ) end |
#test_helpers ⇒ Object
124 125 126 |
# File 'lib/stripe/resources/treasury/inbound_transfer.rb', line 124 def test_helpers TestHelpers.new(self) end |