OnboardingPrompt
Option of an onboarding prompt.
Attributes
int
The prompt's identifier.
bool
Whether this prompt is in the onboarding flow.
str
The prompt's name
The options of the prompt.
bool
Whether this prompt is required to do in the onboarding flow.
bool
Whether only one option can be selected.
The prompt's type.
Properties
created_at
When the entity was created.
Returns
created_at : datetime
Methods
(...)
__new__Creates an onboarding prompt instance from the given parameters.
Parameter | Type | Optional | Keyword only | Description |
---|---|---|---|---|
in_onboarding |
| Whether this prompt is in the onboarding flow. | ||
name |
| The prompt's name | ||
options |
| The options of the prompt. | ||
prompt_type |
| The prompt's type. | ||
required |
| Whether this prompt is required to do in the onboarding flow. | ||
single_select |
| Whether only one option can be selected. |
Raises
TypeError
- If a parameter's type is incorrect.
ValueError
- If a parameter's value is incorrect.
()
copyCopies the onboarding prompt.
Returns
new : instance<type<self>>
(...)
copy_withCopies the onboarding prompt with the given fields.
Parameter | Type | Optional | Keyword only | Description |
---|---|---|---|---|
in_onboarding |
| Whether this prompt is in the onboarding flow. | ||
name |
| The prompt's name | ||
options |
| The options of the prompt. | ||
prompt_type |
| The prompt's type. | ||
required |
| Whether this prompt is required to do in the onboarding flow. | ||
single_select |
| Whether only one option can be selected. |
Returns
new : instance<type<self>>
Raises
TypeError
- If a parameter's type is incorrect.
ValueError
- If a parameter's value is incorrect.
(data)
from_dataCreates a new onboarding prompt from the given data.
Parameter | Type | Description |
---|---|---|
data |
| Onboarding prompt option data. |
Returns
new : instance<cls>
()
iter_optionsIterates over the options of the prompt.
This method is an iterable generator.
Yields
option : OnboardingPromptOption
(prompt_id, ...)
precreatePrecreates an onboarding prompt. Since they are not cached, this method just a .__new__
alternative.
Parameter | Type | Optional | Keyword only | Description |
---|---|---|---|---|
prompt_id |
| The prompt's identifier. | ||
prompt_type |
| The prompt's type. | ||
**keyword_parameters | Keyword parameters | Additional parameters defining how the option's fields should be set. | ||
in_onboarding |
| Whether this prompt is in the onboarding flow. | ||
name |
| The prompt's name | ||
options |
| The options of the prompt. | ||
required |
| Whether this prompt is required to do in the onboarding flow. | ||
single_select |
| Whether only one option can be selected. |
Returns
self : instance<type<self>>
(...)
to_dataConverts the onboarding prompt to json serializable object.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
defaults |
|
| Whether fields with their default value should be included as well. | ||
include_internals |
|
| Whether internal fields should be included as well. |
Returns
data : dict
of (str
, object
) items
(other)
_is_equal_same_typeReturns whether the two onboarding prompts are equal.
Parameter | Type | Description |
---|---|---|
other |
| The other instance. |
Returns
are_equal : bool
()
__eq__Returns whether the two onboarding prompts are equal.
()
__ge__Whether this entity's id is greater or equal than the other's.
()
__getattr__Drops a rich attribute error.
()
__gt__Whether this entity's id is greater than the other's.
()
__hash__Returns the onboarding prompt's hash value.
()
__le__Whether this entity's id is less or equal than the other's.
()
__lt__Whether this entity's id is less than the other's.
()
__ne__Returns whether the two onboarding prompts are not equal.
()
__repr__Returns the onboarding prompt's representation.