Class: Stripe::Checkout::SessionCreateParams::CustomField

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/params/checkout/session_create_params.rb

Defined Under Namespace

Classes: Dropdown, Label, Numeric, Text

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

attr_accessor, new, #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.



309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
# File 'lib/stripe/params/checkout/session_create_params.rb', line 309

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.



295
296
297
# File 'lib/stripe/params/checkout/session_create_params.rb', line 295

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.



297
298
299
# File 'lib/stripe/params/checkout/session_create_params.rb', line 297

def key
  @key
end

#labelObject

The label for the field, displayed to the customer.



299
300
301
# File 'lib/stripe/params/checkout/session_create_params.rb', line 299

def label
  @label
end

#numericObject

Configuration for ‘type=numeric` fields.



301
302
303
# File 'lib/stripe/params/checkout/session_create_params.rb', line 301

def numeric
  @numeric
end

#optionalObject

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



303
304
305
# File 'lib/stripe/params/checkout/session_create_params.rb', line 303

def optional
  @optional
end

#textObject

Configuration for ‘type=text` fields.



305
306
307
# File 'lib/stripe/params/checkout/session_create_params.rb', line 305

def text
  @text
end

#typeObject

The type of the field.



307
308
309
# File 'lib/stripe/params/checkout/session_create_params.rb', line 307

def type
  @type
end