Class: Stripe::Checkout::Session::CreateParams::CustomField
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::Checkout::Session::CreateParams::CustomField
- Defined in:
- lib/stripe/resources/checkout/session.rb
Defined Under Namespace
Classes: Dropdown, Label, Numeric, Text
Instance Attribute Summary collapse
-
#dropdown ⇒ Object
Configuration for ‘type=dropdown` fields.
-
#key ⇒ Object
String of your choice that your integration can use to reconcile this field.
-
#label ⇒ Object
The label for the field, displayed to the customer.
-
#numeric ⇒ Object
Configuration for ‘type=numeric` fields.
-
#optional ⇒ Object
Whether the customer is required to complete the field before completing the Checkout Session.
-
#text ⇒ Object
Configuration for ‘type=text` fields.
-
#type ⇒ Object
The type of the field.
Instance Method Summary collapse
-
#initialize(dropdown: nil, key: nil, label: nil, numeric: nil, optional: nil, text: nil, type: nil) ⇒ CustomField
constructor
A new instance of CustomField.
Methods inherited from RequestParams
Constructor Details
#initialize(dropdown: nil, key: nil, label: nil, numeric: nil, optional: nil, text: nil, type: nil) ⇒ CustomField
Returns a new instance of CustomField.
1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 |
# File 'lib/stripe/resources/checkout/session.rb', line 1269 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
#dropdown ⇒ Object
Configuration for ‘type=dropdown` fields.
1255 1256 1257 |
# File 'lib/stripe/resources/checkout/session.rb', line 1255 def dropdown @dropdown end |
#key ⇒ Object
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.
1257 1258 1259 |
# File 'lib/stripe/resources/checkout/session.rb', line 1257 def key @key end |
#label ⇒ Object
The label for the field, displayed to the customer.
1259 1260 1261 |
# File 'lib/stripe/resources/checkout/session.rb', line 1259 def label @label end |
#numeric ⇒ Object
Configuration for ‘type=numeric` fields.
1261 1262 1263 |
# File 'lib/stripe/resources/checkout/session.rb', line 1261 def numeric @numeric end |
#optional ⇒ Object
Whether the customer is required to complete the field before completing the Checkout Session. Defaults to ‘false`.
1263 1264 1265 |
# File 'lib/stripe/resources/checkout/session.rb', line 1263 def optional @optional end |
#text ⇒ Object
Configuration for ‘type=text` fields.
1265 1266 1267 |
# File 'lib/stripe/resources/checkout/session.rb', line 1265 def text @text end |
#type ⇒ Object
The type of the field.
1267 1268 1269 |
# File 'lib/stripe/resources/checkout/session.rb', line 1267 def type @type end |