Class: Stripe::Treasury::DebitReversal
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::Treasury::DebitReversal
- Extended by:
- APIOperations::Create, APIOperations::List
- Defined in:
- lib/stripe/resources/treasury/debit_reversal.rb
Overview
You can reverse some [ReceivedDebits](stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal.
Defined Under Namespace
Classes: CreateParams, LinkedFlows, ListParams, RetrieveParams, StatusTransitions
Constant Summary collapse
- OBJECT_NAME =
"treasury.debit_reversal"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Amount (in cents) transferred.
-
#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.
-
#financial_account ⇒ Object
readonly
The FinancialAccount to reverse funds 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.
-
#linked_flows ⇒ Object
readonly
Other flows linked to a DebitReversal.
-
#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 ⇒ Object
readonly
The rails used to reverse the funds.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#received_debit ⇒ Object
readonly
The ReceivedDebit being reversed.
-
#status ⇒ Object
readonly
Status of the DebitReversal.
-
#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
-
.create(params = {}, opts = {}) ⇒ Object
Reverses a ReceivedDebit and creates a DebitReversal object.
-
.list(params = {}, opts = {}) ⇒ Object
Returns a list of DebitReversals.
- .object_name ⇒ 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.
98 99 100 |
# File 'lib/stripe/resources/treasury/debit_reversal.rb', line 98 def amount @amount end |
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
101 102 103 |
# File 'lib/stripe/resources/treasury/debit_reversal.rb', line 101 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).
104 105 106 |
# File 'lib/stripe/resources/treasury/debit_reversal.rb', line 104 def currency @currency end |
#financial_account ⇒ Object (readonly)
The FinancialAccount to reverse funds from.
107 108 109 |
# File 'lib/stripe/resources/treasury/debit_reversal.rb', line 107 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.
110 111 112 |
# File 'lib/stripe/resources/treasury/debit_reversal.rb', line 110 def hosted_regulatory_receipt_url @hosted_regulatory_receipt_url end |
#id ⇒ Object (readonly)
Unique identifier for the object.
113 114 115 |
# File 'lib/stripe/resources/treasury/debit_reversal.rb', line 113 def id @id end |
#linked_flows ⇒ Object (readonly)
Other flows linked to a DebitReversal.
116 117 118 |
# File 'lib/stripe/resources/treasury/debit_reversal.rb', line 116 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.
119 120 121 |
# File 'lib/stripe/resources/treasury/debit_reversal.rb', line 119 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.
122 123 124 |
# File 'lib/stripe/resources/treasury/debit_reversal.rb', line 122 def @metadata end |
#network ⇒ Object (readonly)
The rails used to reverse the funds.
125 126 127 |
# File 'lib/stripe/resources/treasury/debit_reversal.rb', line 125 def network @network end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
128 129 130 |
# File 'lib/stripe/resources/treasury/debit_reversal.rb', line 128 def object @object end |
#received_debit ⇒ Object (readonly)
The ReceivedDebit being reversed.
131 132 133 |
# File 'lib/stripe/resources/treasury/debit_reversal.rb', line 131 def received_debit @received_debit end |
#status ⇒ Object (readonly)
Status of the DebitReversal
134 135 136 |
# File 'lib/stripe/resources/treasury/debit_reversal.rb', line 134 def status @status end |
#status_transitions ⇒ Object (readonly)
Attribute for field status_transitions
137 138 139 |
# File 'lib/stripe/resources/treasury/debit_reversal.rb', line 137 def status_transitions @status_transitions end |
#transaction ⇒ Object (readonly)
The Transaction associated with this object.
140 141 142 |
# File 'lib/stripe/resources/treasury/debit_reversal.rb', line 140 def transaction @transaction end |
Class Method Details
.create(params = {}, opts = {}) ⇒ Object
Reverses a ReceivedDebit and creates a DebitReversal object.
143 144 145 146 147 148 149 150 |
# File 'lib/stripe/resources/treasury/debit_reversal.rb', line 143 def self.create(params = {}, opts = {}) request_stripe_object( method: :post, path: "/v1/treasury/debit_reversals", params: params, opts: opts ) end |
.list(params = {}, opts = {}) ⇒ Object
Returns a list of DebitReversals.
153 154 155 156 157 158 159 160 |
# File 'lib/stripe/resources/treasury/debit_reversal.rb', line 153 def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/treasury/debit_reversals", params: params, opts: opts ) end |
.object_name ⇒ Object
12 13 14 |
# File 'lib/stripe/resources/treasury/debit_reversal.rb', line 12 def self.object_name "treasury.debit_reversal" end |