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.



43
44
45
46
47
48
49
# File 'lib/stripe/services/customer_balance_transaction_service.rb', line 43

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.



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

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.



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

def currency
  @currency
end

#descriptionObject

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



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

def description
  @description
end

#expandObject

Specifies which fields in the response should be expanded.



38
39
40
# File 'lib/stripe/services/customer_balance_transaction_service.rb', line 38

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



41
42
43
# File 'lib/stripe/services/customer_balance_transaction_service.rb', line 41

def 
  @metadata
end