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

#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.



234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
# File 'lib/stripe/params/checkout/session_create_params.rb', line 234

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.



220
221
222
# File 'lib/stripe/params/checkout/session_create_params.rb', line 220

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.



222
223
224
# File 'lib/stripe/params/checkout/session_create_params.rb', line 222

def key
  @key
end

#labelObject

The label for the field, displayed to the customer.



224
225
226
# File 'lib/stripe/params/checkout/session_create_params.rb', line 224

def label
  @label
end

#numericObject

Configuration for ‘type=numeric` fields.



226
227
228
# File 'lib/stripe/params/checkout/session_create_params.rb', line 226

def numeric
  @numeric
end

#optionalObject

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



228
229
230
# File 'lib/stripe/params/checkout/session_create_params.rb', line 228

def optional
  @optional
end

#textObject

Configuration for ‘type=text` fields.



230
231
232
# File 'lib/stripe/params/checkout/session_create_params.rb', line 230

def text
  @text
end

#typeObject

The type of the field.



232
233
234
# File 'lib/stripe/params/checkout/session_create_params.rb', line 232

def type
  @type
end