Class: Stripe::Treasury::ReceivedCredit

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

Overview

ReceivedCredits represent funds sent to a [FinancialAccount](stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount.

Defined Under Namespace

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

Constant Summary collapse

OBJECT_NAME =
"treasury.received_credit"

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.



300
301
302
# File 'lib/stripe/resources/treasury/received_credit.rb', line 300

def amount
  @amount
end

#createdObject (readonly)

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



303
304
305
# File 'lib/stripe/resources/treasury/received_credit.rb', line 303

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



306
307
308
# File 'lib/stripe/resources/treasury/received_credit.rb', line 306

def currency
  @currency
end

#descriptionObject (readonly)

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



309
310
311
# File 'lib/stripe/resources/treasury/received_credit.rb', line 309

def description
  @description
end

#failure_codeObject (readonly)

Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen.



312
313
314
# File 'lib/stripe/resources/treasury/received_credit.rb', line 312

def failure_code
  @failure_code
end

#financial_accountObject (readonly)

The FinancialAccount that received the funds.



315
316
317
# File 'lib/stripe/resources/treasury/received_credit.rb', line 315

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.



318
319
320
# File 'lib/stripe/resources/treasury/received_credit.rb', line 318

def hosted_regulatory_receipt_url
  @hosted_regulatory_receipt_url
end

#idObject (readonly)

Unique identifier for the object.



321
322
323
# File 'lib/stripe/resources/treasury/received_credit.rb', line 321

def id
  @id
end

#initiating_payment_method_detailsObject (readonly)

Attribute for field initiating_payment_method_details



324
325
326
# File 'lib/stripe/resources/treasury/received_credit.rb', line 324

def initiating_payment_method_details
  @initiating_payment_method_details
end

#linked_flowsObject (readonly)

Attribute for field linked_flows



327
328
329
# File 'lib/stripe/resources/treasury/received_credit.rb', line 327

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.



330
331
332
# File 'lib/stripe/resources/treasury/received_credit.rb', line 330

def livemode
  @livemode
end

#networkObject (readonly)

The rails used to send the funds.



333
334
335
# File 'lib/stripe/resources/treasury/received_credit.rb', line 333

def network
  @network
end

#network_detailsObject (readonly)

Details specific to the money movement rails.



336
337
338
# File 'lib/stripe/resources/treasury/received_credit.rb', line 336

def network_details
  @network_details
end

#objectObject (readonly)

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



339
340
341
# File 'lib/stripe/resources/treasury/received_credit.rb', line 339

def object
  @object
end

#reversal_detailsObject (readonly)

Details describing when a ReceivedCredit may be reversed.



342
343
344
# File 'lib/stripe/resources/treasury/received_credit.rb', line 342

def reversal_details
  @reversal_details
end

#statusObject (readonly)

Status of the ReceivedCredit. ReceivedCredits are created either ‘succeeded` (approved) or `failed` (declined). If a ReceivedCredit is declined, the failure reason can be found in the `failure_code` field.



345
346
347
# File 'lib/stripe/resources/treasury/received_credit.rb', line 345

def status
  @status
end

#transactionObject (readonly)

The Transaction associated with this object.



348
349
350
# File 'lib/stripe/resources/treasury/received_credit.rb', line 348

def transaction
  @transaction
end

Class Method Details

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

Returns a list of ReceivedCredits.



351
352
353
354
355
356
357
358
# File 'lib/stripe/resources/treasury/received_credit.rb', line 351

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

.object_nameObject



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

def self.object_name
  "treasury.received_credit"
end

Instance Method Details

#test_helpersObject



360
361
362
# File 'lib/stripe/resources/treasury/received_credit.rb', line 360

def test_helpers
  TestHelpers.new(self)
end