Class: Stripe::PaymentLinkService::CreateParams::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.



199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
# File 'lib/stripe/services/payment_link_service.rb', line 199

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.



185
186
187
# File 'lib/stripe/services/payment_link_service.rb', line 185

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.



187
188
189
# File 'lib/stripe/services/payment_link_service.rb', line 187

def key
  @key
end

#labelObject

The label for the field, displayed to the customer.



189
190
191
# File 'lib/stripe/services/payment_link_service.rb', line 189

def label
  @label
end

#numericObject

Configuration for ‘type=numeric` fields.



191
192
193
# File 'lib/stripe/services/payment_link_service.rb', line 191

def numeric
  @numeric
end

#optionalObject

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



193
194
195
# File 'lib/stripe/services/payment_link_service.rb', line 193

def optional
  @optional
end

#textObject

Configuration for ‘type=text` fields.



195
196
197
# File 'lib/stripe/services/payment_link_service.rb', line 195

def text
  @text
end

#typeObject

The type of the field.



197
198
199
# File 'lib/stripe/services/payment_link_service.rb', line 197

def type
  @type
end