Class: Stripe::PaymentLinkCreateParams::CustomField

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/params/payment_link_create_params.rb

Defined Under Namespace

Classes: Dropdown, Label, Numeric, Text

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

attr_accessor, coerce_params, coerce_value, field_encodings, new, #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.



185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
# File 'lib/stripe/params/payment_link_create_params.rb', line 185

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.



171
172
173
# File 'lib/stripe/params/payment_link_create_params.rb', line 171

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.



173
174
175
# File 'lib/stripe/params/payment_link_create_params.rb', line 173

def key
  @key
end

#labelObject

The label for the field, displayed to the customer.



175
176
177
# File 'lib/stripe/params/payment_link_create_params.rb', line 175

def label
  @label
end

#numericObject

Configuration for ‘type=numeric` fields.



177
178
179
# File 'lib/stripe/params/payment_link_create_params.rb', line 177

def numeric
  @numeric
end

#optionalObject

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



179
180
181
# File 'lib/stripe/params/payment_link_create_params.rb', line 179

def optional
  @optional
end

#textObject

Configuration for ‘type=text` fields.



181
182
183
# File 'lib/stripe/params/payment_link_create_params.rb', line 181

def text
  @text
end

#typeObject

The type of the field.



183
184
185
# File 'lib/stripe/params/payment_link_create_params.rb', line 183

def type
  @type
end