Class: Stripe::PaymentLink::CreateParams

Inherits:
RequestParams show all
Defined in:
lib/stripe/resources/payment_link.rb

Defined Under Namespace

Classes: AfterCompletion, AutomaticTax, ConsentCollection, CustomField, CustomText, InvoiceCreation, LineItem, OptionalItem, PaymentIntentData, PhoneNumberCollection, Restrictions, ShippingAddressCollection, ShippingOption, SubscriptionData, TaxIdCollection, TransferData

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(after_completion: nil, allow_promotion_codes: nil, application_fee_amount: nil, application_fee_percent: nil, automatic_tax: nil, billing_address_collection: nil, consent_collection: nil, currency: nil, custom_fields: nil, custom_text: nil, customer_creation: nil, expand: nil, inactive_message: nil, invoice_creation: nil, line_items: nil, metadata: nil, on_behalf_of: nil, optional_items: nil, payment_intent_data: nil, payment_method_collection: nil, payment_method_types: nil, phone_number_collection: nil, restrictions: nil, shipping_address_collection: nil, shipping_options: nil, submit_type: nil, subscription_data: nil, tax_id_collection: nil, transfer_data: nil) ⇒ CreateParams

Returns a new instance of CreateParams.



1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
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
# File 'lib/stripe/resources/payment_link.rb', line 1334

def initialize(
  after_completion: nil,
  allow_promotion_codes: nil,
  application_fee_amount: nil,
  application_fee_percent: nil,
  automatic_tax: nil,
  billing_address_collection: nil,
  consent_collection: nil,
  currency: nil,
  custom_fields: nil,
  custom_text: nil,
  customer_creation: nil,
  expand: nil,
  inactive_message: nil,
  invoice_creation: nil,
  line_items: nil,
  metadata: nil,
  on_behalf_of: nil,
  optional_items: nil,
  payment_intent_data: nil,
  payment_method_collection: nil,
  payment_method_types: nil,
  phone_number_collection: nil,
  restrictions: nil,
  shipping_address_collection: nil,
  shipping_options: nil,
  submit_type: nil,
  subscription_data: nil,
  tax_id_collection: nil,
  transfer_data: nil
)
  @after_completion = after_completion
  @allow_promotion_codes = allow_promotion_codes
  @application_fee_amount = application_fee_amount
  @application_fee_percent = application_fee_percent
  @automatic_tax = automatic_tax
  @billing_address_collection = billing_address_collection
  @consent_collection = consent_collection
  @currency = currency
  @custom_fields = custom_fields
  @custom_text = custom_text
  @customer_creation = customer_creation
  @expand = expand
  @inactive_message = inactive_message
  @invoice_creation = invoice_creation
  @line_items = line_items
  @metadata = 
  @on_behalf_of = on_behalf_of
  @optional_items = optional_items
  @payment_intent_data = payment_intent_data
  @payment_method_collection = payment_method_collection
  @payment_method_types = payment_method_types
  @phone_number_collection = phone_number_collection
  @restrictions = restrictions
  @shipping_address_collection = shipping_address_collection
  @shipping_options = shipping_options
  @submit_type = submit_type
  @subscription_data = subscription_data
  @tax_id_collection = tax_id_collection
  @transfer_data = transfer_data
end

Instance Attribute Details

#after_completionObject

Behavior after the purchase is complete.



1268
1269
1270
# File 'lib/stripe/resources/payment_link.rb', line 1268

def after_completion
  @after_completion
end

#allow_promotion_codesObject

Enables user redeemable promotion codes.



1270
1271
1272
# File 'lib/stripe/resources/payment_link.rb', line 1270

def allow_promotion_codes
  @allow_promotion_codes
end

#application_fee_amountObject

The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner’s Stripe account. Can only be applied when there are no line items with recurring prices.



1272
1273
1274
# File 'lib/stripe/resources/payment_link.rb', line 1272

def application_fee_amount
  @application_fee_amount
end

#application_fee_percentObject

A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner’s Stripe account. There must be at least 1 line item with a recurring price to use this field.



1274
1275
1276
# File 'lib/stripe/resources/payment_link.rb', line 1274

def application_fee_percent
  @application_fee_percent
end

#automatic_taxObject

Configuration for automatic tax collection.



1276
1277
1278
# File 'lib/stripe/resources/payment_link.rb', line 1276

def automatic_tax
  @automatic_tax
end

#billing_address_collectionObject

Configuration for collecting the customer’s billing address. Defaults to ‘auto`.



1278
1279
1280
# File 'lib/stripe/resources/payment_link.rb', line 1278

def billing_address_collection
  @billing_address_collection
end

Configure fields to gather active consent from customers.



1280
1281
1282
# File 'lib/stripe/resources/payment_link.rb', line 1280

def consent_collection
  @consent_collection
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) and supported by each line item’s price.



1282
1283
1284
# File 'lib/stripe/resources/payment_link.rb', line 1282

def currency
  @currency
end

#custom_fieldsObject

Collect additional information from your customer using custom fields. Up to 3 fields are supported.



1284
1285
1286
# File 'lib/stripe/resources/payment_link.rb', line 1284

def custom_fields
  @custom_fields
end

#custom_textObject

Display additional text for your customers using custom text.



1286
1287
1288
# File 'lib/stripe/resources/payment_link.rb', line 1286

def custom_text
  @custom_text
end

#customer_creationObject

Configures whether [checkout sessions](stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](stripe.com/docs/api/customers).



1288
1289
1290
# File 'lib/stripe/resources/payment_link.rb', line 1288

def customer_creation
  @customer_creation
end

#expandObject

Specifies which fields in the response should be expanded.



1290
1291
1292
# File 'lib/stripe/resources/payment_link.rb', line 1290

def expand
  @expand
end

#inactive_messageObject

The custom message to be displayed to a customer when a payment link is no longer active.



1292
1293
1294
# File 'lib/stripe/resources/payment_link.rb', line 1292

def inactive_message
  @inactive_message
end

#invoice_creationObject

Generate a post-purchase Invoice for one-time payments.



1294
1295
1296
# File 'lib/stripe/resources/payment_link.rb', line 1294

def invoice_creation
  @invoice_creation
end

#line_itemsObject

The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported.



1296
1297
1298
# File 'lib/stripe/resources/payment_link.rb', line 1296

def line_items
  @line_items
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`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](stripe.com/docs/api/checkout/sessions) created by this payment link.



1298
1299
1300
# File 'lib/stripe/resources/payment_link.rb', line 1298

def 
  @metadata
end

#on_behalf_ofObject

The account on behalf of which to charge.



1300
1301
1302
# File 'lib/stripe/resources/payment_link.rb', line 1300

def on_behalf_of
  @on_behalf_of
end

#optional_itemsObject

A list of optional items the customer can add to their order at checkout. Use this parameter to pass one-time or recurring [Prices](stripe.com/docs/api/prices). There is a maximum of 10 optional items allowed on a payment link, and the existing limits on the number of line items allowed on a payment link apply to the combined number of line items and optional items. There is a maximum of 20 combined line items and optional items.



1304
1305
1306
# File 'lib/stripe/resources/payment_link.rb', line 1304

def optional_items
  @optional_items
end

#payment_intent_dataObject

A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in ‘payment` mode.



1306
1307
1308
# File 'lib/stripe/resources/payment_link.rb', line 1306

def payment_intent_data
  @payment_intent_data
end

#payment_method_collectionObject

Specify whether Checkout should collect a payment method. When set to ‘if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount.

Can only be set in ‘subscription` mode. Defaults to `always`.

If you’d like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](stripe.com/docs/payments/checkout/free-trials).



1312
1313
1314
# File 'lib/stripe/resources/payment_link.rb', line 1312

def payment_method_collection
  @payment_method_collection
end

#payment_method_typesObject

The list of payment method types that customers can use. If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)).



1314
1315
1316
# File 'lib/stripe/resources/payment_link.rb', line 1314

def payment_method_types
  @payment_method_types
end

#phone_number_collectionObject

Controls phone number collection settings during checkout.

We recommend that you review your privacy policy and check with your legal contacts.



1318
1319
1320
# File 'lib/stripe/resources/payment_link.rb', line 1318

def phone_number_collection
  @phone_number_collection
end

#restrictionsObject

Settings that restrict the usage of a payment link.



1320
1321
1322
# File 'lib/stripe/resources/payment_link.rb', line 1320

def restrictions
  @restrictions
end

#shipping_address_collectionObject

Configuration for collecting the customer’s shipping address.



1322
1323
1324
# File 'lib/stripe/resources/payment_link.rb', line 1322

def shipping_address_collection
  @shipping_address_collection
end

#shipping_optionsObject

The shipping rate options to apply to [checkout sessions](stripe.com/docs/api/checkout/sessions) created by this payment link.



1324
1325
1326
# File 'lib/stripe/resources/payment_link.rb', line 1324

def shipping_options
  @shipping_options
end

#submit_typeObject

Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](stripe.com/docs/api/payment_links/payment_links/object#url) property (example: ‘donate.stripe.com`).



1326
1327
1328
# File 'lib/stripe/resources/payment_link.rb', line 1326

def submit_type
  @submit_type
end

#subscription_dataObject

When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use ‘subscription_data`.



1328
1329
1330
# File 'lib/stripe/resources/payment_link.rb', line 1328

def subscription_data
  @subscription_data
end

#tax_id_collectionObject

Controls tax ID collection during checkout.



1330
1331
1332
# File 'lib/stripe/resources/payment_link.rb', line 1330

def tax_id_collection
  @tax_id_collection
end

#transfer_dataObject

The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.



1332
1333
1334
# File 'lib/stripe/resources/payment_link.rb', line 1332

def transfer_data
  @transfer_data
end