Class: Stripe::TopupCreateParams

Inherits:
RequestParams show all
Defined in:
lib/stripe/params/topup_create_params.rb

Defined Under Namespace

Classes: PaymentMethodOptions

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, currency: nil, description: nil, expand: nil, metadata: nil, payment_method: nil, payment_method_options: nil, source: nil, statement_descriptor: nil, transfer_group: nil) ⇒ TopupCreateParams

Returns a new instance of TopupCreateParams.



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/stripe/params/topup_create_params.rb', line 43

def initialize(
  amount: nil,
  currency: nil,
  description: nil,
  expand: nil,
  metadata: nil,
  payment_method: nil,
  payment_method_options: nil,
  source: nil,
  statement_descriptor: nil,
  transfer_group: nil
)
  @amount = amount
  @currency = currency
  @description = description
  @expand = expand
  @metadata = 
  @payment_method = payment_method
  @payment_method_options = payment_method_options
  @source = source
  @statement_descriptor = statement_descriptor
  @transfer_group = transfer_group
end

Instance Attribute Details

#amountObject

A positive integer representing how much to transfer.



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

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



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

def currency
  @currency
end

#descriptionObject

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



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

def description
  @description
end

#expandObject

Specifies which fields in the response should be expanded.



29
30
31
# File 'lib/stripe/params/topup_create_params.rb', line 29

def expand
  @expand
end

#metadataObject

Set of [key-value pairs](docs.stripe.com/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`.



31
32
33
# File 'lib/stripe/params/topup_create_params.rb', line 31

def 
  @metadata
end

#payment_methodObject

The ID of a PaymentMethod representing the payment method to be used for the top-up. A PaymentMethod of type ‘us_bank_account` can be used.



33
34
35
# File 'lib/stripe/params/topup_create_params.rb', line 33

def payment_method
  @payment_method
end

#payment_method_optionsObject

Payment method-specific configuration for this top-up.



35
36
37
# File 'lib/stripe/params/topup_create_params.rb', line 35

def payment_method_options
  @payment_method_options
end

#sourceObject

The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](docs.stripe.com/connect/testing#testing-top-ups)).



37
38
39
# File 'lib/stripe/params/topup_create_params.rb', line 37

def source
  @source
end

#statement_descriptorObject

Extra information about a top-up for the source’s bank statement. Limited to 15 ASCII characters.



39
40
41
# File 'lib/stripe/params/topup_create_params.rb', line 39

def statement_descriptor
  @statement_descriptor
end

#transfer_groupObject

A string that identifies this top-up as part of a group.



41
42
43
# File 'lib/stripe/params/topup_create_params.rb', line 41

def transfer_group
  @transfer_group
end