Class: Stripe::PaymentLink::CreateParams::CustomField

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/resources/payment_link.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.



516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
# File 'lib/stripe/resources/payment_link.rb', line 516

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.



496
497
498
# File 'lib/stripe/resources/payment_link.rb', line 496

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.



499
500
501
# File 'lib/stripe/resources/payment_link.rb', line 499

def key
  @key
end

#labelObject

The label for the field, displayed to the customer.



502
503
504
# File 'lib/stripe/resources/payment_link.rb', line 502

def label
  @label
end

#numericObject

Configuration for ‘type=numeric` fields.



505
506
507
# File 'lib/stripe/resources/payment_link.rb', line 505

def numeric
  @numeric
end

#optionalObject

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



508
509
510
# File 'lib/stripe/resources/payment_link.rb', line 508

def optional
  @optional
end

#textObject

Configuration for ‘type=text` fields.



511
512
513
# File 'lib/stripe/resources/payment_link.rb', line 511

def text
  @text
end

#typeObject

The type of the field.



514
515
516
# File 'lib/stripe/resources/payment_link.rb', line 514

def type
  @type
end