Class: Stripe::Treasury::CreditReversal
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::Treasury::CreditReversal
- Extended by:
- APIOperations::Create, APIOperations::List
- Defined in:
- lib/stripe/resources/treasury/credit_reversal.rb
Overview
You can reverse some [ReceivedCredits](stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal.
Defined Under Namespace
Classes: StatusTransitions
Constant Summary collapse
- OBJECT_NAME =
"treasury.credit_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.
-
#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_credit ⇒ Object
readonly
The ReceivedCredit being reversed.
-
#status ⇒ Object
readonly
Status of the CreditReversal.
-
#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 ReceivedCredit and creates a CreditReversal object.
- .field_remappings ⇒ Object
- .inner_class_types ⇒ Object
-
.list(params = {}, opts = {}) ⇒ Object
Returns a list of CreditReversals.
- .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
#==, #[], #[]=, #_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.
29 30 31 |
# File 'lib/stripe/resources/treasury/credit_reversal.rb', line 29 def amount @amount end |
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
31 32 33 |
# File 'lib/stripe/resources/treasury/credit_reversal.rb', line 31 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).
33 34 35 |
# File 'lib/stripe/resources/treasury/credit_reversal.rb', line 33 def currency @currency end |
#financial_account ⇒ Object (readonly)
The FinancialAccount to reverse funds from.
35 36 37 |
# File 'lib/stripe/resources/treasury/credit_reversal.rb', line 35 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.
37 38 39 |
# File 'lib/stripe/resources/treasury/credit_reversal.rb', line 37 def hosted_regulatory_receipt_url @hosted_regulatory_receipt_url end |
#id ⇒ Object (readonly)
Unique identifier for the object.
39 40 41 |
# File 'lib/stripe/resources/treasury/credit_reversal.rb', line 39 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.
41 42 43 |
# File 'lib/stripe/resources/treasury/credit_reversal.rb', line 41 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.
43 44 45 |
# File 'lib/stripe/resources/treasury/credit_reversal.rb', line 43 def @metadata end |
#network ⇒ Object (readonly)
The rails used to reverse the funds.
45 46 47 |
# File 'lib/stripe/resources/treasury/credit_reversal.rb', line 45 def network @network end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
47 48 49 |
# File 'lib/stripe/resources/treasury/credit_reversal.rb', line 47 def object @object end |
#received_credit ⇒ Object (readonly)
The ReceivedCredit being reversed.
49 50 51 |
# File 'lib/stripe/resources/treasury/credit_reversal.rb', line 49 def received_credit @received_credit end |
#status ⇒ Object (readonly)
Status of the CreditReversal
51 52 53 |
# File 'lib/stripe/resources/treasury/credit_reversal.rb', line 51 def status @status end |
#status_transitions ⇒ Object (readonly)
Attribute for field status_transitions
53 54 55 |
# File 'lib/stripe/resources/treasury/credit_reversal.rb', line 53 def status_transitions @status_transitions end |
#transaction ⇒ Object (readonly)
The Transaction associated with this object.
55 56 57 |
# File 'lib/stripe/resources/treasury/credit_reversal.rb', line 55 def transaction @transaction end |
Class Method Details
.create(params = {}, opts = {}) ⇒ Object
Reverses a ReceivedCredit and creates a CreditReversal object.
58 59 60 61 62 63 64 65 |
# File 'lib/stripe/resources/treasury/credit_reversal.rb', line 58 def self.create(params = {}, opts = {}) request_stripe_object( method: :post, path: "/v1/treasury/credit_reversals", params: params, opts: opts ) end |
.field_remappings ⇒ Object
81 82 83 |
# File 'lib/stripe/resources/treasury/credit_reversal.rb', line 81 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
77 78 79 |
# File 'lib/stripe/resources/treasury/credit_reversal.rb', line 77 def self.inner_class_types @inner_class_types = { status_transitions: StatusTransitions } end |
.list(params = {}, opts = {}) ⇒ Object
Returns a list of CreditReversals.
68 69 70 71 72 73 74 75 |
# File 'lib/stripe/resources/treasury/credit_reversal.rb', line 68 def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/treasury/credit_reversals", params: params, opts: opts ) end |
.object_name ⇒ Object
12 13 14 |
# File 'lib/stripe/resources/treasury/credit_reversal.rb', line 12 def self.object_name "treasury.credit_reversal" end |