Class: Stripe::Checkout::Session::CreateParams::CustomField

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/resources/checkout/session.rb

Defined Under Namespace

Classes: Dropdown, Label, Numeric, Text

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(dropdown: nil, key: nil, label: nil, numeric: nil, optional: nil, text: nil, type: nil) ⇒ CustomField

Returns a new instance of CustomField.



1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
# File 'lib/stripe/resources/checkout/session.rb', line 1345

def initialize(
  dropdown: nil,
  key: nil,
  label: nil,
  numeric: nil,
  optional: nil,
  text: nil,
  type: nil
)
  @dropdown = dropdown
  @key = key
  @label = label
  @numeric = numeric
  @optional = optional
  @text = text
  @type = type
end

Instance Attribute Details

Configuration for ‘type=dropdown` fields.



1331
1332
1333
# File 'lib/stripe/resources/checkout/session.rb', line 1331

def dropdown
  @dropdown
end

#keyObject

String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters.



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

def key
  @key
end

#labelObject

The label for the field, displayed to the customer.



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

def label
  @label
end

#numericObject

Configuration for ‘type=numeric` fields.



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

def numeric
  @numeric
end

#optionalObject

Whether the customer is required to complete the field before completing the Checkout Session. Defaults to ‘false`.



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

def optional
  @optional
end

#textObject

Configuration for ‘type=text` fields.



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

def text
  @text
end

#typeObject

The type of the field.



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

def type
  @type
end