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.



1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
# File 'lib/stripe/resources/checkout/session.rb', line 1258

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.



1244
1245
1246
# File 'lib/stripe/resources/checkout/session.rb', line 1244

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.



1246
1247
1248
# File 'lib/stripe/resources/checkout/session.rb', line 1246

def key
  @key
end

#labelObject

The label for the field, displayed to the customer.



1248
1249
1250
# File 'lib/stripe/resources/checkout/session.rb', line 1248

def label
  @label
end

#numericObject

Configuration for ‘type=numeric` fields.



1250
1251
1252
# File 'lib/stripe/resources/checkout/session.rb', line 1250

def numeric
  @numeric
end

#optionalObject

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



1252
1253
1254
# File 'lib/stripe/resources/checkout/session.rb', line 1252

def optional
  @optional
end

#textObject

Configuration for ‘type=text` fields.



1254
1255
1256
# File 'lib/stripe/resources/checkout/session.rb', line 1254

def text
  @text
end

#typeObject

The type of the field.



1256
1257
1258
# File 'lib/stripe/resources/checkout/session.rb', line 1256

def type
  @type
end