Class: Stripe::Treasury::DebitReversal

Inherits:
APIResource show all
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, StatusTransitions

Constant Summary collapse

OBJECT_NAME =
"treasury.debit_reversal"

Constants inherited from StripeObject

StripeObject::RESERVED_FIELD_NAMES

Instance Attribute Summary collapse

Attributes inherited from APIResource

#save_with_parent

Attributes inherited from StripeObject

#last_response

Class Method Summary collapse

Methods included from APIOperations::Create

create

Methods included from APIOperations::List

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

included

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

#amountObject (readonly)

Amount (in cents) transferred.



80
81
82
# File 'lib/stripe/resources/treasury/debit_reversal.rb', line 80

def amount
  @amount
end

#createdObject (readonly)

Time at which the object was created. Measured in seconds since the Unix epoch.



82
83
84
# File 'lib/stripe/resources/treasury/debit_reversal.rb', line 82

def created
  @created
end

#currencyObject (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).



84
85
86
# File 'lib/stripe/resources/treasury/debit_reversal.rb', line 84

def currency
  @currency
end

#financial_accountObject (readonly)

The FinancialAccount to reverse funds from.



86
87
88
# File 'lib/stripe/resources/treasury/debit_reversal.rb', line 86

def 
  @financial_account
end

#hosted_regulatory_receipt_urlObject (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.



88
89
90
# File 'lib/stripe/resources/treasury/debit_reversal.rb', line 88

def hosted_regulatory_receipt_url
  @hosted_regulatory_receipt_url
end

#idObject (readonly)

Unique identifier for the object.



90
91
92
# File 'lib/stripe/resources/treasury/debit_reversal.rb', line 90

def id
  @id
end

#linked_flowsObject (readonly)

Other flows linked to a DebitReversal.



92
93
94
# File 'lib/stripe/resources/treasury/debit_reversal.rb', line 92

def linked_flows
  @linked_flows
end

#livemodeObject (readonly)

Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.



94
95
96
# File 'lib/stripe/resources/treasury/debit_reversal.rb', line 94

def livemode
  @livemode
end

#metadataObject (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.



96
97
98
# File 'lib/stripe/resources/treasury/debit_reversal.rb', line 96

def 
  @metadata
end

#networkObject (readonly)

The rails used to reverse the funds.



98
99
100
# File 'lib/stripe/resources/treasury/debit_reversal.rb', line 98

def network
  @network
end

#objectObject (readonly)

String representing the object’s type. Objects of the same type share the same value.



100
101
102
# File 'lib/stripe/resources/treasury/debit_reversal.rb', line 100

def object
  @object
end

#received_debitObject (readonly)

The ReceivedDebit being reversed.



102
103
104
# File 'lib/stripe/resources/treasury/debit_reversal.rb', line 102

def received_debit
  @received_debit
end

#statusObject (readonly)

Status of the DebitReversal



104
105
106
# File 'lib/stripe/resources/treasury/debit_reversal.rb', line 104

def status
  @status
end

#status_transitionsObject (readonly)

Attribute for field status_transitions



106
107
108
# File 'lib/stripe/resources/treasury/debit_reversal.rb', line 106

def status_transitions
  @status_transitions
end

#transactionObject (readonly)

The Transaction associated with this object.



108
109
110
# File 'lib/stripe/resources/treasury/debit_reversal.rb', line 108

def transaction
  @transaction
end

Class Method Details

.create(params = {}, opts = {}) ⇒ Object

Reverses a ReceivedDebit and creates a DebitReversal object.



111
112
113
114
115
116
117
118
# File 'lib/stripe/resources/treasury/debit_reversal.rb', line 111

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.



121
122
123
124
125
126
127
128
# File 'lib/stripe/resources/treasury/debit_reversal.rb', line 121

def self.list(params = {}, opts = {})
  request_stripe_object(
    method: :get,
    path: "/v1/treasury/debit_reversals",
    params: params,
    opts: opts
  )
end

.object_nameObject



12
13
14
# File 'lib/stripe/resources/treasury/debit_reversal.rb', line 12

def self.object_name
  "treasury.debit_reversal"
end