Class: Stripe::PaymentLinkService::UpdateParams::CustomField

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



870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
# File 'lib/stripe/services/payment_link_service.rb', line 870

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.



856
857
858
# File 'lib/stripe/services/payment_link_service.rb', line 856

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.



858
859
860
# File 'lib/stripe/services/payment_link_service.rb', line 858

def key
  @key
end

#labelObject

The label for the field, displayed to the customer.



860
861
862
# File 'lib/stripe/services/payment_link_service.rb', line 860

def label
  @label
end

#numericObject

Configuration for ‘type=numeric` fields.



862
863
864
# File 'lib/stripe/services/payment_link_service.rb', line 862

def numeric
  @numeric
end

#optionalObject

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



864
865
866
# File 'lib/stripe/services/payment_link_service.rb', line 864

def optional
  @optional
end

#textObject

Configuration for ‘type=text` fields.



866
867
868
# File 'lib/stripe/services/payment_link_service.rb', line 866

def text
  @text
end

#typeObject

The type of the field.



868
869
870
# File 'lib/stripe/services/payment_link_service.rb', line 868

def type
  @type
end