Class: Stripe::CustomerBalanceTransactionCreateParams

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/params/customer_balance_transaction_create_params.rb

Defined Under Namespace

Classes: AppliedToInvoice

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

attr_accessor, coerce_params, coerce_value, field_encodings, new, #to_h

Constructor Details

#initialize(amount: nil, applied_to_invoice: nil, currency: nil, description: nil, expand: nil, metadata: nil, type: nil) ⇒ CustomerBalanceTransactionCreateParams

Returns a new instance of CustomerBalanceTransactionCreateParams.



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/stripe/params/customer_balance_transaction_create_params.rb', line 29

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

Instance Attribute Details

#amountObject

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



15
16
17
# File 'lib/stripe/params/customer_balance_transaction_create_params.rb', line 15

def amount
  @amount
end

#applied_to_invoiceObject

Required when type is applied_to_invoice. Identifies the open invoice to apply the customer's balance credit to.



17
18
19
# File 'lib/stripe/params/customer_balance_transaction_create_params.rb', line 17

def applied_to_invoice
  @applied_to_invoice
end

#currencyObject

Three-letter ISO currency code, in lowercase. Must be a supported currency. Specifies the invoice_credit_balance that this transaction will apply to. If the customer's currency is not set, it will be updated to this value.



19
20
21
# File 'lib/stripe/params/customer_balance_transaction_create_params.rb', line 19

def currency
  @currency
end

#descriptionObject

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



21
22
23
# File 'lib/stripe/params/customer_balance_transaction_create_params.rb', line 21

def description
  @description
end

#expandObject

Specifies which fields in the response should be expanded.



23
24
25
# File 'lib/stripe/params/customer_balance_transaction_create_params.rb', line 23

def expand
  @expand
end

#metadataObject

Set of key-value pairs 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.



25
26
27
# File 'lib/stripe/params/customer_balance_transaction_create_params.rb', line 25

def 
  @metadata
end

#typeObject

The type of customer balance transaction. Defaults to adjustment, which updates the customer's credit balance directly. Set to applied_to_invoice to apply the customer's existing credit balance to a specific open invoice.



27
28
29
# File 'lib/stripe/params/customer_balance_transaction_create_params.rb', line 27

def type
  @type
end