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.



800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
# File 'lib/stripe/resources/payment_link.rb', line 800

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.



786
787
788
# File 'lib/stripe/resources/payment_link.rb', line 786

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.



788
789
790
# File 'lib/stripe/resources/payment_link.rb', line 788

def key
  @key
end

#labelObject

The label for the field, displayed to the customer.



790
791
792
# File 'lib/stripe/resources/payment_link.rb', line 790

def label
  @label
end

#numericObject

Configuration for ‘type=numeric` fields.



792
793
794
# File 'lib/stripe/resources/payment_link.rb', line 792

def numeric
  @numeric
end

#optionalObject

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



794
795
796
# File 'lib/stripe/resources/payment_link.rb', line 794

def optional
  @optional
end

#textObject

Configuration for ‘type=text` fields.



796
797
798
# File 'lib/stripe/resources/payment_link.rb', line 796

def text
  @text
end

#typeObject

The type of the field.



798
799
800
# File 'lib/stripe/resources/payment_link.rb', line 798

def type
  @type
end