Class: Stripe::CustomerBalanceTransactionService::CreateParams

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/services/customer_balance_transaction_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(amount: nil, currency: nil, description: nil, expand: nil, metadata: nil) ⇒ CreateParams

Returns a new instance of CreateParams.



36
37
38
39
40
41
42
# File 'lib/stripe/services/customer_balance_transaction_service.rb', line 36

def initialize(amount: nil, currency: nil, description: nil, expand: nil, metadata: nil)
  @amount = amount
  @currency = currency
  @description = description
  @expand = expand
  @metadata = 
end

Instance Attribute Details

#amountObject

The integer amount in **cents (or local equivalent)** to apply to the customer’s credit balance.



26
27
28
# File 'lib/stripe/services/customer_balance_transaction_service.rb', line 26

def amount
  @amount
end

#currencyObject

Three-letter [ISO currency code](www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](stripe.com/docs/currencies). Specifies the [‘invoice_credit_balance`](stripe.com/docs/api/customers/object#customer_object-invoice_credit_balance) that this transaction will apply to. If the customer’s ‘currency` is not set, it will be updated to this value.



28
29
30
# File 'lib/stripe/services/customer_balance_transaction_service.rb', line 28

def currency
  @currency
end

#descriptionObject

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



30
31
32
# File 'lib/stripe/services/customer_balance_transaction_service.rb', line 30

def description
  @description
end

#expandObject

Specifies which fields in the response should be expanded.



32
33
34
# File 'lib/stripe/services/customer_balance_transaction_service.rb', line 32

def expand
  @expand
end

#metadataObject

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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to ‘metadata`.



34
35
36
# File 'lib/stripe/services/customer_balance_transaction_service.rb', line 34

def 
  @metadata
end