Class: Stripe::TopupService::CreateParams

Inherits:
RequestParams show all
Defined in:
lib/stripe/services/topup_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, source: nil, statement_descriptor: nil, transfer_group: nil) ⇒ CreateParams

Returns a new instance of CreateParams.



94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# File 'lib/stripe/services/topup_service.rb', line 94

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

Instance Attribute Details

#amountObject

A positive integer representing how much to transfer.



78
79
80
# File 'lib/stripe/services/topup_service.rb', line 78

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



80
81
82
# File 'lib/stripe/services/topup_service.rb', line 80

def currency
  @currency
end

#descriptionObject

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



82
83
84
# File 'lib/stripe/services/topup_service.rb', line 82

def description
  @description
end

#expandObject

Specifies which fields in the response should be expanded.



84
85
86
# File 'lib/stripe/services/topup_service.rb', line 84

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



86
87
88
# File 'lib/stripe/services/topup_service.rb', line 86

def 
  @metadata
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](stripe.com/docs/connect/testing#testing-top-ups)).



88
89
90
# File 'lib/stripe/services/topup_service.rb', line 88

def source
  @source
end

#statement_descriptorObject

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



90
91
92
# File 'lib/stripe/services/topup_service.rb', line 90

def statement_descriptor
  @statement_descriptor
end

#transfer_groupObject

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



92
93
94
# File 'lib/stripe/services/topup_service.rb', line 92

def transfer_group
  @transfer_group
end