Class: Stripe::Billing::CreditBalanceTransaction

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

Overview

A credit balance transaction is a resource representing a transaction (either a credit or a debit) against an existing credit grant.

Defined Under Namespace

Classes: Credit, Debit

Constant Summary collapse

OBJECT_NAME =
"billing.credit_balance_transaction"

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::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

#createdObject (readonly)

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



39
40
41
# File 'lib/stripe/resources/billing/credit_balance_transaction.rb', line 39

def created
  @created
end

#creditObject (readonly)

Credit details for this credit balance transaction. Only present if type is ‘credit`.



41
42
43
# File 'lib/stripe/resources/billing/credit_balance_transaction.rb', line 41

def credit
  @credit
end

#credit_grantObject (readonly)

The credit grant associated with this credit balance transaction.



43
44
45
# File 'lib/stripe/resources/billing/credit_balance_transaction.rb', line 43

def credit_grant
  @credit_grant
end

#debitObject (readonly)

Debit details for this credit balance transaction. Only present if type is ‘debit`.



45
46
47
# File 'lib/stripe/resources/billing/credit_balance_transaction.rb', line 45

def debit
  @debit
end

#effective_atObject (readonly)

The effective time of this credit balance transaction.



47
48
49
# File 'lib/stripe/resources/billing/credit_balance_transaction.rb', line 47

def effective_at
  @effective_at
end

#idObject (readonly)

Unique identifier for the object.



49
50
51
# File 'lib/stripe/resources/billing/credit_balance_transaction.rb', line 49

def id
  @id
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.



51
52
53
# File 'lib/stripe/resources/billing/credit_balance_transaction.rb', line 51

def livemode
  @livemode
end

#objectObject (readonly)

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



53
54
55
# File 'lib/stripe/resources/billing/credit_balance_transaction.rb', line 53

def object
  @object
end

#test_clockObject (readonly)

ID of the test clock this credit balance transaction belongs to.



55
56
57
# File 'lib/stripe/resources/billing/credit_balance_transaction.rb', line 55

def test_clock
  @test_clock
end

#typeObject (readonly)

The type of credit balance transaction (credit or debit).



57
58
59
# File 'lib/stripe/resources/billing/credit_balance_transaction.rb', line 57

def type
  @type
end

Class Method Details

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

Retrieve a list of credit balance transactions.



60
61
62
63
64
65
66
67
# File 'lib/stripe/resources/billing/credit_balance_transaction.rb', line 60

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

.object_nameObject



11
12
13
# File 'lib/stripe/resources/billing/credit_balance_transaction.rb', line 11

def self.object_name
  "billing.credit_balance_transaction"
end