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.



1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
# File 'lib/stripe/resources/checkout/session.rb', line 1520

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.



1500
1501
1502
# File 'lib/stripe/resources/checkout/session.rb', line 1500

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.



1503
1504
1505
# File 'lib/stripe/resources/checkout/session.rb', line 1503

def key
  @key
end

#labelObject

The label for the field, displayed to the customer.



1506
1507
1508
# File 'lib/stripe/resources/checkout/session.rb', line 1506

def label
  @label
end

#numericObject

Configuration for ‘type=numeric` fields.



1509
1510
1511
# File 'lib/stripe/resources/checkout/session.rb', line 1509

def numeric
  @numeric
end

#optionalObject

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



1512
1513
1514
# File 'lib/stripe/resources/checkout/session.rb', line 1512

def optional
  @optional
end

#textObject

Configuration for ‘type=text` fields.



1515
1516
1517
# File 'lib/stripe/resources/checkout/session.rb', line 1515

def text
  @text
end

#typeObject

The type of the field.



1518
1519
1520
# File 'lib/stripe/resources/checkout/session.rb', line 1518

def type
  @type
end