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.



1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
# File 'lib/stripe/resources/checkout/session.rb', line 1289

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.



1275
1276
1277
# File 'lib/stripe/resources/checkout/session.rb', line 1275

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.



1277
1278
1279
# File 'lib/stripe/resources/checkout/session.rb', line 1277

def key
  @key
end

#labelObject

The label for the field, displayed to the customer.



1279
1280
1281
# File 'lib/stripe/resources/checkout/session.rb', line 1279

def label
  @label
end

#numericObject

Configuration for ‘type=numeric` fields.



1281
1282
1283
# File 'lib/stripe/resources/checkout/session.rb', line 1281

def numeric
  @numeric
end

#optionalObject

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



1283
1284
1285
# File 'lib/stripe/resources/checkout/session.rb', line 1283

def optional
  @optional
end

#textObject

Configuration for ‘type=text` fields.



1285
1286
1287
# File 'lib/stripe/resources/checkout/session.rb', line 1285

def text
  @text
end

#typeObject

The type of the field.



1287
1288
1289
# File 'lib/stripe/resources/checkout/session.rb', line 1287

def type
  @type
end