OnboardingPrompt

Option of an onboarding prompt.

Attributes

id : int

The prompt's identifier.

in_onboarding : bool

Whether this prompt is in the onboarding flow.

name : str

The prompt's name

options : None, tuple of OnboardingPromptOption

The options of the prompt.

required : bool

Whether this prompt is required to do in the onboarding flow.

single_select : 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.

ParameterTypeOptionalKeyword onlyDescription
in_onboarding

bool

Whether this prompt is in the onboarding flow.

name

str

The prompt's name

options

None, iterable of OnboardingPromptOption

The options of the prompt.

prompt_type

OnboardingPromptType, int

The prompt's type.

required

bool

Whether this prompt is required to do in the onboarding flow.

single_select

bool

Whether only one option can be selected.

Raises

TypeError

  • If a parameter's type is incorrect.

ValueError

  • If a parameter's value is incorrect.

copy()

Copies the onboarding prompt.

Returns

new : instance<type<self>>

copy_with(...)

Copies the onboarding prompt with the given fields.

ParameterTypeOptionalKeyword onlyDescription
in_onboarding

bool

Whether this prompt is in the onboarding flow.

name

str

The prompt's name

options

None, iterable of OnboardingPromptOption

The options of the prompt.

prompt_type

OnboardingPromptType, int

The prompt's type.

required

bool

Whether this prompt is required to do in the onboarding flow.

single_select

bool

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.

from_data(data)

Creates a new onboarding prompt from the given data.

ParameterTypeDescription
data

dict of (str, object) items

Onboarding prompt option data.

Returns

new : instance<cls>

iter_options()

Iterates over the options of the prompt.

This method is an iterable generator.

Yields

option : OnboardingPromptOption

precreate(prompt_id, ...)

Precreates an onboarding prompt. Since they are not cached, this method just a .__new__ alternative.

ParameterTypeOptionalKeyword onlyDescription
prompt_id

int

The prompt's identifier.

prompt_type

PromptType, int

The prompt's type.

**keyword_parameters

Keyword parameters

Additional parameters defining how the option's fields should be set.

in_onboarding

bool

Whether this prompt is in the onboarding flow.

name

str

The prompt's name

options

None, iterable of OnboardingPromptOption

The options of the prompt.

required

bool

Whether this prompt is required to do in the onboarding flow.

single_select

bool

Whether only one option can be selected.

Returns

self : instance<type<self>>

to_data(...)

Converts the onboarding prompt to json serializable object.

ParameterTypeOptionalKeyword onlyDefaultDescription
defaults

bool

False

Whether fields with their default value should be included as well.

include_internals

bool

False

Whether internal fields should be included as well.

Returns

data : dict of (str, object) items

_is_equal_same_type(other)

Returns whether the two onboarding prompts are equal.

ParameterTypeDescription
other

instance<type<self>>

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.