Class: Stripe::SourceCreateParams

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

Defined Under Namespace

Classes: Mandate, Owner, Receiver, Redirect, SourceOrder

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(amount: nil, currency: nil, customer: nil, expand: nil, flow: nil, mandate: nil, metadata: nil, original_source: nil, owner: nil, receiver: nil, redirect: nil, source_order: nil, statement_descriptor: nil, token: nil, type: nil, usage: nil) ⇒ SourceCreateParams

Returns a new instance of SourceCreateParams.



281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
# File 'lib/stripe/params/source_create_params.rb', line 281

def initialize(
  amount: nil,
  currency: nil,
  customer: nil,
  expand: nil,
  flow: nil,
  mandate: nil,
  metadata: nil,
  original_source: nil,
  owner: nil,
  receiver: nil,
  redirect: nil,
  source_order: nil,
  statement_descriptor: nil,
  token: nil,
  type: nil,
  usage: nil
)
  @amount = amount
  @currency = currency
  @customer = customer
  @expand = expand
  @flow = flow
  @mandate = mandate
  @metadata = 
  @original_source = original_source
  @owner = owner
  @receiver = receiver
  @redirect = redirect
  @source_order = source_order
  @statement_descriptor = statement_descriptor
  @token = token
  @type = type
  @usage = usage
end

Instance Attribute Details

#amountObject

Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for ‘single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land.



249
250
251
# File 'lib/stripe/params/source_create_params.rb', line 249

def amount
  @amount
end

#currencyObject

Three-letter [ISO code for the currency](stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready.



251
252
253
# File 'lib/stripe/params/source_create_params.rb', line 251

def currency
  @currency
end

#customerObject

The ‘Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`).



253
254
255
# File 'lib/stripe/params/source_create_params.rb', line 253

def customer
  @customer
end

#expandObject

Specifies which fields in the response should be expanded.



255
256
257
# File 'lib/stripe/params/source_create_params.rb', line 255

def expand
  @expand
end

#flowObject

The authentication ‘flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows.



257
258
259
# File 'lib/stripe/params/source_create_params.rb', line 257

def flow
  @flow
end

#mandateObject

Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status.



259
260
261
# File 'lib/stripe/params/source_create_params.rb', line 259

def mandate
  @mandate
end

#metadataObject

Attribute for param field metadata



261
262
263
# File 'lib/stripe/params/source_create_params.rb', line 261

def 
  @metadata
end

#original_sourceObject

The source to share.



263
264
265
# File 'lib/stripe/params/source_create_params.rb', line 263

def original_source
  @original_source
end

#ownerObject

Information about the owner of the payment instrument that may be used or required by particular source types.



265
266
267
# File 'lib/stripe/params/source_create_params.rb', line 265

def owner
  @owner
end

#receiverObject

Optional parameters for the receiver flow. Can be set only if the source is a receiver (‘flow` is `receiver`).



267
268
269
# File 'lib/stripe/params/source_create_params.rb', line 267

def receiver
  @receiver
end

#redirectObject

Parameters required for the redirect flow. Required if the source is authenticated by a redirect (‘flow` is `redirect`).



269
270
271
# File 'lib/stripe/params/source_create_params.rb', line 269

def redirect
  @redirect
end

#source_orderObject

Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it.



271
272
273
# File 'lib/stripe/params/source_create_params.rb', line 271

def source_order
  @source_order
end

#statement_descriptorObject

An arbitrary string to be displayed on your customer’s statement. As an example, if your website is ‘RunClub` and the item you’re charging for is a race ticket, you may want to specify a ‘statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all.



273
274
275
# File 'lib/stripe/params/source_create_params.rb', line 273

def statement_descriptor
  @statement_descriptor
end

#tokenObject

An optional token used to create the source. When passed, token properties will override source parameters.



275
276
277
# File 'lib/stripe/params/source_create_params.rb', line 275

def token
  @token
end

#typeObject

The ‘type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](stripe.com/docs/sources/connect#cloning-card-sources) guide)



277
278
279
# File 'lib/stripe/params/source_create_params.rb', line 277

def type
  @type
end

#usageObject

Attribute for param field usage



279
280
281
# File 'lib/stripe/params/source_create_params.rb', line 279

def usage
  @usage
end