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.



2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
# File 'lib/stripe/resources/checkout/session.rb', line 2430

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.



2416
2417
2418
# File 'lib/stripe/resources/checkout/session.rb', line 2416

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.



2418
2419
2420
# File 'lib/stripe/resources/checkout/session.rb', line 2418

def key
  @key
end

#labelObject

The label for the field, displayed to the customer.



2420
2421
2422
# File 'lib/stripe/resources/checkout/session.rb', line 2420

def label
  @label
end

#numericObject

Configuration for ‘type=numeric` fields.



2422
2423
2424
# File 'lib/stripe/resources/checkout/session.rb', line 2422

def numeric
  @numeric
end

#optionalObject

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



2424
2425
2426
# File 'lib/stripe/resources/checkout/session.rb', line 2424

def optional
  @optional
end

#textObject

Configuration for ‘type=text` fields.



2426
2427
2428
# File 'lib/stripe/resources/checkout/session.rb', line 2426

def text
  @text
end

#typeObject

The type of the field.



2428
2429
2430
# File 'lib/stripe/resources/checkout/session.rb', line 2428

def type
  @type
end