Class: Stripe::Source::CreateParams

Inherits:
RequestParams show all
Defined in:
lib/stripe/resources/source.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) ⇒ CreateParams

Returns a new instance of CreateParams.



1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
# File 'lib/stripe/resources/source.rb', line 1365

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.



1333
1334
1335
# File 'lib/stripe/resources/source.rb', line 1333

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.



1335
1336
1337
# File 'lib/stripe/resources/source.rb', line 1335

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



1337
1338
1339
# File 'lib/stripe/resources/source.rb', line 1337

def customer
  @customer
end

#expandObject

Specifies which fields in the response should be expanded.



1339
1340
1341
# File 'lib/stripe/resources/source.rb', line 1339

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.



1341
1342
1343
# File 'lib/stripe/resources/source.rb', line 1341

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.



1343
1344
1345
# File 'lib/stripe/resources/source.rb', line 1343

def mandate
  @mandate
end

#metadataObject

Attribute for param field metadata



1345
1346
1347
# File 'lib/stripe/resources/source.rb', line 1345

def 
  @metadata
end

#original_sourceObject

The source to share.



1347
1348
1349
# File 'lib/stripe/resources/source.rb', line 1347

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.



1349
1350
1351
# File 'lib/stripe/resources/source.rb', line 1349

def owner
  @owner
end

#receiverObject

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



1351
1352
1353
# File 'lib/stripe/resources/source.rb', line 1351

def receiver
  @receiver
end

#redirectObject

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



1353
1354
1355
# File 'lib/stripe/resources/source.rb', line 1353

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.



1355
1356
1357
# File 'lib/stripe/resources/source.rb', line 1355

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.



1357
1358
1359
# File 'lib/stripe/resources/source.rb', line 1357

def statement_descriptor
  @statement_descriptor
end

#tokenObject

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



1359
1360
1361
# File 'lib/stripe/resources/source.rb', line 1359

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)



1361
1362
1363
# File 'lib/stripe/resources/source.rb', line 1361

def type
  @type
end

#usageObject

Attribute for param field usage



1363
1364
1365
# File 'lib/stripe/resources/source.rb', line 1363

def usage
  @usage
end