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.



1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
# File 'lib/stripe/resources/checkout/session.rb', line 1319

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.



1305
1306
1307
# File 'lib/stripe/resources/checkout/session.rb', line 1305

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.



1307
1308
1309
# File 'lib/stripe/resources/checkout/session.rb', line 1307

def key
  @key
end

#labelObject

The label for the field, displayed to the customer.



1309
1310
1311
# File 'lib/stripe/resources/checkout/session.rb', line 1309

def label
  @label
end

#numericObject

Configuration for ‘type=numeric` fields.



1311
1312
1313
# File 'lib/stripe/resources/checkout/session.rb', line 1311

def numeric
  @numeric
end

#optionalObject

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



1313
1314
1315
# File 'lib/stripe/resources/checkout/session.rb', line 1313

def optional
  @optional
end

#textObject

Configuration for ‘type=text` fields.



1315
1316
1317
# File 'lib/stripe/resources/checkout/session.rb', line 1315

def text
  @text
end

#typeObject

The type of the field.



1317
1318
1319
# File 'lib/stripe/resources/checkout/session.rb', line 1317

def type
  @type
end