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.



943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
# File 'lib/stripe/services/payment_link_service.rb', line 943

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.



929
930
931
# File 'lib/stripe/services/payment_link_service.rb', line 929

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.



931
932
933
# File 'lib/stripe/services/payment_link_service.rb', line 931

def key
  @key
end

#labelObject

The label for the field, displayed to the customer.



933
934
935
# File 'lib/stripe/services/payment_link_service.rb', line 933

def label
  @label
end

#numericObject

Configuration for ‘type=numeric` fields.



935
936
937
# File 'lib/stripe/services/payment_link_service.rb', line 935

def numeric
  @numeric
end

#optionalObject

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



937
938
939
# File 'lib/stripe/services/payment_link_service.rb', line 937

def optional
  @optional
end

#textObject

Configuration for ‘type=text` fields.



939
940
941
# File 'lib/stripe/services/payment_link_service.rb', line 939

def text
  @text
end

#typeObject

The type of the field.



941
942
943
# File 'lib/stripe/services/payment_link_service.rb', line 941

def type
  @type
end