Type "select"
If your function implementation needs to make a single selection between a group of static options like selecting a type of a Stripe Connected Account (express, standard, or custom), you can use environment variables of type select in your implementation. Then our platform will ask consumers to enter their value during installation.
The type select variables allow the consumers of a function to select one of the elements from a list of options, which you need to define using the options prop. This type is displayed in the installation UI form as a select element (see image below).
Example of a type "select" environment variable definition
Example of how to consume the value of the environment variable within the function implementation
Properties of the type
property | type | required | default | description |
name | string | yes | - | The name of the environment variable. This should be unique for each variable. |
description | string | no | - | The description of the environment variable. |
default | string | no | - | The default value for the variable. |
required | bool | no | false | Specifies that a variable must be filled out before submitting. |
options | array | yes | - | The options will define the env values for the select. Each option value should be unique inside the array. |
Last updated