Class: Stripe::Treasury::ReceivedDebit

Inherits:
APIResource show all
Extended by:
APIOperations::List
Defined in:
lib/stripe/resources/treasury/received_debit.rb

Overview

ReceivedDebits represent funds pulled from a [FinancialAccount](stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount.

Defined Under Namespace

Classes: CreateParams, InitiatingPaymentMethodDetails, LinkedFlows, ListParams, ReversalDetails, TestHelpers

Constant Summary collapse

OBJECT_NAME =
"treasury.received_debit"

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

Instance Method Summary collapse

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.



179
180
181
# File 'lib/stripe/resources/treasury/received_debit.rb', line 179

def amount
  @amount
end

#createdObject (readonly)

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



181
182
183
# File 'lib/stripe/resources/treasury/received_debit.rb', line 181

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).



183
184
185
# File 'lib/stripe/resources/treasury/received_debit.rb', line 183

def currency
  @currency
end

#descriptionObject (readonly)

An arbitrary string attached to the object. Often useful for displaying to users.



185
186
187
# File 'lib/stripe/resources/treasury/received_debit.rb', line 185

def description
  @description
end

#failure_codeObject (readonly)

Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn’t have sufficient funds, is closed, or is frozen.



187
188
189
# File 'lib/stripe/resources/treasury/received_debit.rb', line 187

def failure_code
  @failure_code
end

#financial_accountObject (readonly)

The FinancialAccount that funds were pulled from.



189
190
191
# File 'lib/stripe/resources/treasury/received_debit.rb', line 189

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.



191
192
193
# File 'lib/stripe/resources/treasury/received_debit.rb', line 191

def hosted_regulatory_receipt_url
  @hosted_regulatory_receipt_url
end

#idObject (readonly)

Unique identifier for the object.



193
194
195
# File 'lib/stripe/resources/treasury/received_debit.rb', line 193

def id
  @id
end

#initiating_payment_method_detailsObject (readonly)

Attribute for field initiating_payment_method_details



195
196
197
# File 'lib/stripe/resources/treasury/received_debit.rb', line 195

def initiating_payment_method_details
  @initiating_payment_method_details
end

#linked_flowsObject (readonly)

Attribute for field linked_flows



197
198
199
# File 'lib/stripe/resources/treasury/received_debit.rb', line 197

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.



199
200
201
# File 'lib/stripe/resources/treasury/received_debit.rb', line 199

def livemode
  @livemode
end

#networkObject (readonly)

The network used for the ReceivedDebit.



201
202
203
# File 'lib/stripe/resources/treasury/received_debit.rb', line 201

def network
  @network
end

#objectObject (readonly)

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



203
204
205
# File 'lib/stripe/resources/treasury/received_debit.rb', line 203

def object
  @object
end

#reversal_detailsObject (readonly)

Details describing when a ReceivedDebit might be reversed.



205
206
207
# File 'lib/stripe/resources/treasury/received_debit.rb', line 205

def reversal_details
  @reversal_details
end

#statusObject (readonly)

Status of the ReceivedDebit. ReceivedDebits are created with a status of either ‘succeeded` (approved) or `failed` (declined). The failure reason can be found under the `failure_code`.



207
208
209
# File 'lib/stripe/resources/treasury/received_debit.rb', line 207

def status
  @status
end

#transactionObject (readonly)

The Transaction associated with this object.



209
210
211
# File 'lib/stripe/resources/treasury/received_debit.rb', line 209

def transaction
  @transaction
end

Class Method Details

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

Returns a list of ReceivedDebits.



212
213
214
215
216
217
218
219
# File 'lib/stripe/resources/treasury/received_debit.rb', line 212

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

.object_nameObject



11
12
13
# File 'lib/stripe/resources/treasury/received_debit.rb', line 11

def self.object_name
  "treasury.received_debit"
end

Instance Method Details

#test_helpersObject



221
222
223
# File 'lib/stripe/resources/treasury/received_debit.rb', line 221

def test_helpers
  TestHelpers.new(self)
end