NAME

Twilio::Rest::FlexApi::V1::InsightsQuestionnairesQuestion - The InsightsQuestionnairesQuestion resource

SYNOPSIS

my $client = Twilio::Rest::Client->new($account_sid, $auth_token);

my $insights_questionnaires_question = $client->flex_api->v1->insights_questionnaires_question->create($category_sid, $question, $answer_set_id, $allow_na, \%options);
for my $insights_questionnaires_question ($client->flex_api->v1->insights_questionnaires_question->read({}, 20)) {
  ...
}
$client->flex_api->v1->insights_questionnaires_question($question_sid)->update($allow_na, \%options);
$client->flex_api->v1->insights_questionnaires_question($question_sid)->delete;

DESCRIPTION

This file holds InsightsQuestionnairesQuestionList, InsightsQuestionnairesQuestionPage, InsightsQuestionnairesQuestionContext and InsightsQuestionnairesQuestionInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

InsightsQuestionnairesQuestionList

Returned by $client->flex_api->v1->insights_questionnaires_question. See also Twilio::ListResource.

create

my $insights_questionnaires_question = $client->flex_api->v1->insights_questionnaires_question->create($category_sid, $question, $answer_set_id, $allow_na, \%options);

To create a question for a Category. Returns a InsightsQuestionnairesQuestionInstance.

The required values are:

$category_sid

The SID of the category

$question

The question.

$answer_set_id

The answer_set for the question.

$allow_na

The flag to enable for disable NA for answer.

The options are:

description

The description for the question.

authorization

The Authorization HTTP request header

read

my @records = $client->flex_api->v1->insights_questionnaires_question->read(\%options, $limit, $page_size);

To get all the question for the given categories. Returns the records as a list, fetching as many pages as it needs.

The options are:

authorization

The Authorization HTTP request header

category_sid

The list of category SIDs An array reference.

stream

my $stream = $client->flex_api->v1->insights_questionnaires_question->stream(\%options, $limit, $page_size);

Takes the same arguments as "read", and returns a Twilio::Stream.

page

my $page = $client->flex_api->v1->insights_questionnaires_question->page(\%options, $page_size, $page_token, $page_number);

Fetches one page, and returns a Twilio::Page.

get_page

my $page = $client->flex_api->v1->insights_questionnaires_question->get_page($url);

Fetches the page at a URL given by Twilio.

get_context

my $context = $client->flex_api->v1->insights_questionnaires_question->get_context($question_sid);

Returns a InsightsQuestionnairesQuestionContext, and makes no request.

InsightsQuestionnairesQuestionPage

A Twilio::Page of InsightsQuestionnairesQuestionInstance objects.

records_key

build_instance

Used by Twilio::Page.

InsightsQuestionnairesQuestionContext

Returned by $client->flex_api->v1->insights_questionnaires_question($question_sid). It makes no request until one of these methods is called.

update

my $insights_questionnaires_question = $client->flex_api->v1->insights_questionnaires_question($question_sid)->update($allow_na, \%options);

To update the question. Returns a InsightsQuestionnairesQuestionInstance.

The required values are:

$allow_na

The flag to enable for disable NA for answer.

The options are:

answer_set_id

The answer_set for the question.

category_sid

The SID of the category

description

The description for the question.

question

The question.

authorization

The Authorization HTTP request header

delete

$client->flex_api->v1->insights_questionnaires_question($question_sid)->delete(\%options);

Returns true.

The options are:

authorization

The Authorization HTTP request header

InsightsQuestionnairesQuestionInstance

See also Twilio::InstanceResource.

It has update and delete, which work as they do on the context.

Its fields are:

account_sid

The SID of the Account that created the Flex Insights resource and owns this resource.

allow_na

The flag to enable for disable NA for answer.

answer_set

Set of answers for the question

answer_set_id

The answer_set for the question.

category

The Category for the question.

description

The description for the question.

question

The question.

question_sid

The SID of the question

url

No description in the specification.

usage

Integer value that tells a particular question is used by how many questionnaires

CONSTRUCTORS

new

Objects here come from the methods above, so there is no need to call new directly.

LICENSE

Copyright (c) 2026 Francisco Zarabozo. Released under the MIT License.