Class: Stripe::Billing::CreditBalanceTransaction
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::Billing::CreditBalanceTransaction
- 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
Constant Summary collapse
- OBJECT_NAME =
"billing.credit_balance_transaction"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#created ⇒ Object
readonly
Time at which the object was created.
-
#credit ⇒ Object
readonly
Credit details for this credit balance transaction.
-
#credit_grant ⇒ Object
readonly
The credit grant associated with this credit balance transaction.
-
#debit ⇒ Object
readonly
Debit details for this credit balance transaction.
-
#effective_at ⇒ Object
readonly
The effective time of this credit balance transaction.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#livemode ⇒ Object
readonly
If the object exists in live mode, the value is
true. -
#object ⇒ Object
readonly
String representing the object's type.
-
#test_clock ⇒ Object
readonly
ID of the test clock this credit balance transaction belongs to.
-
#type ⇒ Object
readonly
The type of credit balance transaction (credit or debit).
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
- .field_encodings ⇒ Object
- .field_remappings ⇒ Object
- .inner_class_types ⇒ Object
-
.list(params = {}, opts = {}) ⇒ Object
Retrieve a list of credit balance transactions.
- .object_name ⇒ Object
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
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
274 275 276 |
# File 'lib/stripe/resources/billing/credit_balance_transaction.rb', line 274 def created @created end |
#credit ⇒ Object (readonly)
Credit details for this credit balance transaction. Only present if type is credit.
276 277 278 |
# File 'lib/stripe/resources/billing/credit_balance_transaction.rb', line 276 def credit @credit end |
#credit_grant ⇒ Object (readonly)
The credit grant associated with this credit balance transaction.
278 279 280 |
# File 'lib/stripe/resources/billing/credit_balance_transaction.rb', line 278 def credit_grant @credit_grant end |
#debit ⇒ Object (readonly)
Debit details for this credit balance transaction. Only present if type is debit.
280 281 282 |
# File 'lib/stripe/resources/billing/credit_balance_transaction.rb', line 280 def debit @debit end |
#effective_at ⇒ Object (readonly)
The effective time of this credit balance transaction.
282 283 284 |
# File 'lib/stripe/resources/billing/credit_balance_transaction.rb', line 282 def effective_at @effective_at end |
#id ⇒ Object (readonly)
Unique identifier for the object.
284 285 286 |
# File 'lib/stripe/resources/billing/credit_balance_transaction.rb', line 284 def id @id end |
#livemode ⇒ Object (readonly)
If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.
286 287 288 |
# File 'lib/stripe/resources/billing/credit_balance_transaction.rb', line 286 def livemode @livemode end |
#object ⇒ Object (readonly)
String representing the object's type. Objects of the same type share the same value.
288 289 290 |
# File 'lib/stripe/resources/billing/credit_balance_transaction.rb', line 288 def object @object end |
#test_clock ⇒ Object (readonly)
ID of the test clock this credit balance transaction belongs to.
290 291 292 |
# File 'lib/stripe/resources/billing/credit_balance_transaction.rb', line 290 def test_clock @test_clock end |
#type ⇒ Object (readonly)
The type of credit balance transaction (credit or debit).
292 293 294 |
# File 'lib/stripe/resources/billing/credit_balance_transaction.rb', line 292 def type @type end |
Class Method Details
.field_encodings ⇒ Object
312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 |
# File 'lib/stripe/resources/billing/credit_balance_transaction.rb', line 312 def self.field_encodings @field_encodings = { credit: { kind: :nullable, inner: { kind: :object, fields: { amount: { kind: :object, fields: { custom_pricing_unit: { kind: :nullable, inner: { kind: :object, fields: { value: :decimal_string } }, }, }, }, }, }, }, debit: { kind: :nullable, inner: { kind: :object, fields: { amount: { kind: :object, fields: { custom_pricing_unit: { kind: :nullable, inner: { kind: :object, fields: { value: :decimal_string } }, }, }, }, }, }, }, } end |
.field_remappings ⇒ Object
308 309 310 |
# File 'lib/stripe/resources/billing/credit_balance_transaction.rb', line 308 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
304 305 306 |
# File 'lib/stripe/resources/billing/credit_balance_transaction.rb', line 304 def self.inner_class_types @inner_class_types = { credit: Credit, debit: Debit } end |
.list(params = {}, opts = {}) ⇒ Object
Retrieve a list of credit balance transactions.
295 296 297 298 299 300 301 302 |
# File 'lib/stripe/resources/billing/credit_balance_transaction.rb', line 295 def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/billing/credit_balance_transactions", params: params, opts: opts ) end |
.object_name ⇒ Object
11 12 13 |
# File 'lib/stripe/resources/billing/credit_balance_transaction.rb', line 11 def self.object_name "billing.credit_balance_transaction" end |