« Twilio/Rest/Conversations/V1/Conversation/Message.pm
↑ Summary
Twilio/Rest/Api/V2010/Account/Conference.pm »
| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||||||||||
| 2 | package Twilio::Rest::FlexApi::V1::InsightsQuestionnairesQuestion; | ||||||||||||||||||||
| 3 | |||||||||||||||||||||
| 4 | 2 | ▶ | use 5.016; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | 2 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | 2 | our $VERSION = '2.001'; | |||||||||||||||||||
| 8 | |||||||||||||||||||||
| 9 | package Twilio::Rest::FlexApi::V1::InsightsQuestionnairesQuestionList; | ||||||||||||||||||||
| 10 | |||||||||||||||||||||
| 11 | 2 | ▶ | use parent 'Twilio::ListResource'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | 2 | ▶ | use Twilio::Serialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 14 | |||||||||||||||||||||
| 15 | 4 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 16 | 4 | my ($class, $version) = @_; | |||||||||||||||||||
| 17 | 4 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 18 | 4 | $self->{solution} = {}; | |||||||||||||||||||
| 19 | 4 | $self->{uri} = '/Insights/QualityManagement/Questions'; | |||||||||||||||||||
| 20 | 4 | return $self; | |||||||||||||||||||
| 21 | } | ||||||||||||||||||||
| 22 | |||||||||||||||||||||
| 23 | 1 | ▶ | sub create { | ||||||||||||||||||
|
Subroutine
create: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 24 | 1 | my ($self, $category_sid, $question, $answer_set_id, $allow_na, $options) = @_; | |||||||||||||||||||
| 25 | 1 | ▶ | $options //= {}; | ||||||||||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||||||||||
| 26 | |||||||||||||||||||||
| 27 | my $data = { | ||||||||||||||||||||
| 28 | CategorySid => $category_sid, | ||||||||||||||||||||
| 29 | Question => $question, | ||||||||||||||||||||
| 30 | AnswerSetId => $answer_set_id, | ||||||||||||||||||||
| 31 | AllowNa => Twilio::Serialize::boolean_to_string($allow_na), | ||||||||||||||||||||
| 32 | Description => $options->{description}, | ||||||||||||||||||||
| 33 | 1 | }; | |||||||||||||||||||
| 34 | |||||||||||||||||||||
| 35 | my $response = $self->{version}->handle_request( | ||||||||||||||||||||
| 36 | 'POST', | ||||||||||||||||||||
| 37 | $self->{uri}, | ||||||||||||||||||||
| 38 | 'create', | ||||||||||||||||||||
| 39 | { | ||||||||||||||||||||
| 40 | data => $data, | ||||||||||||||||||||
| 41 | headers => { Authorization => $options->{authorization}, } | ||||||||||||||||||||
| 42 | } | ||||||||||||||||||||
| 43 | 1 | ); | |||||||||||||||||||
| 44 | return Twilio::Rest::FlexApi::V1::InsightsQuestionnairesQuestionInstance->new($self->{version}, | ||||||||||||||||||||
| 45 | 1 | $response->get_content); | |||||||||||||||||||
| 46 | } | ||||||||||||||||||||
| 47 | |||||||||||||||||||||
| 48 | 0 | ▶ | sub read { | ||||||||||||||||||
|
Subroutine
read: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 49 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 50 | 0 | return $self->read_records(@arguments); | |||||||||||||||||||
| 51 | } | ||||||||||||||||||||
| 52 | |||||||||||||||||||||
| 53 | 0 | ▶ | sub stream { | ||||||||||||||||||
|
Subroutine
stream: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 54 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 55 | 0 | return $self->stream_records(@arguments); | |||||||||||||||||||
| 56 | } | ||||||||||||||||||||
| 57 | |||||||||||||||||||||
| 58 | 1 | ▶ | sub page { | ||||||||||||||||||
|
Subroutine
page: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 59 | 1 | my ($self, $options, $page_size, $page_token, $page_number) = @_; | |||||||||||||||||||
| 60 | 1 | ▶ | $options //= {}; | ||||||||||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||||||||||
| 61 | |||||||||||||||||||||
| 62 | my $params = { | ||||||||||||||||||||
| 63 | CategorySid => $options->{category_sid}, | ||||||||||||||||||||
| 64 | 1 | PageToken => $page_token, | |||||||||||||||||||
| 65 | Page => $page_number, | ||||||||||||||||||||
| 66 | PageSize => $page_size, | ||||||||||||||||||||
| 67 | }; | ||||||||||||||||||||
| 68 | |||||||||||||||||||||
| 69 | my $response = $self->{version}->page( | ||||||||||||||||||||
| 70 | 'GET', | ||||||||||||||||||||
| 71 | $self->{uri}, | ||||||||||||||||||||
| 72 | { | ||||||||||||||||||||
| 73 | params => $params, | ||||||||||||||||||||
| 74 | headers => { Authorization => $options->{authorization}, } | ||||||||||||||||||||
| 75 | } | ||||||||||||||||||||
| 76 | 1 | ); | |||||||||||||||||||
| 77 | 1 | return $self->_build_page($response); | |||||||||||||||||||
| 78 | } | ||||||||||||||||||||
| 79 | |||||||||||||||||||||
| 80 | 0 | ▶ | sub get_page { | ||||||||||||||||||
|
Subroutine
get_page: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 81 | 0 | my ($self, $target_url) = @_; | |||||||||||||||||||
| 82 | 0 | my $client = $self->{version}->get_domain->get_client; | |||||||||||||||||||
| 83 | 0 | return $self->_build_page($client->request('GET', $target_url)); | |||||||||||||||||||
| 84 | } | ||||||||||||||||||||
| 85 | |||||||||||||||||||||
| 86 | 1 | ▶ | sub _build_page { | ||||||||||||||||||
|
Subroutine
_build_page: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 87 | 1 | my ($self, $response) = @_; | |||||||||||||||||||
| 88 | return Twilio::Rest::FlexApi::V1::InsightsQuestionnairesQuestionPage->new($self->{version}, | ||||||||||||||||||||
| 89 | 1 | $response, $self->{solution}); | |||||||||||||||||||
| 90 | } | ||||||||||||||||||||
| 91 | |||||||||||||||||||||
| 92 | 2 | ▶ | sub get_context { | ||||||||||||||||||
|
Subroutine
get_context: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 93 | 2 | my ($self, $question_sid) = @_; | |||||||||||||||||||
| 94 | return Twilio::Rest::FlexApi::V1::InsightsQuestionnairesQuestionContext->new($self->{version}, | ||||||||||||||||||||
| 95 | 2 | $question_sid); | |||||||||||||||||||
| 96 | } | ||||||||||||||||||||
| 97 | |||||||||||||||||||||
| 98 | package Twilio::Rest::FlexApi::V1::InsightsQuestionnairesQuestionPage; | ||||||||||||||||||||
| 99 | |||||||||||||||||||||
| 100 | 2 | ▶ | use parent 'Twilio::Page'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 101 | |||||||||||||||||||||
| 102 | 1 | ▶ | sub records_key { return 'questions' } | ||||||||||||||||||
|
Subroutine
records_key: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 103 | |||||||||||||||||||||
| 104 | 1 | ▶ | sub build_instance { | ||||||||||||||||||
|
Subroutine
build_instance: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 105 | 1 | my ($self, $payload) = @_; | |||||||||||||||||||
| 106 | return Twilio::Rest::FlexApi::V1::InsightsQuestionnairesQuestionInstance->new($self->{version}, | ||||||||||||||||||||
| 107 | 1 | $payload); | |||||||||||||||||||
| 108 | } | ||||||||||||||||||||
| 109 | |||||||||||||||||||||
| 110 | package Twilio::Rest::FlexApi::V1::InsightsQuestionnairesQuestionContext; | ||||||||||||||||||||
| 111 | |||||||||||||||||||||
| 112 | 2 | ▶ | use parent 'Twilio::InstanceContext'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 113 | |||||||||||||||||||||
| 114 | 2 | ▶ | use Twilio::Serialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 115 | |||||||||||||||||||||
| 116 | 2 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 117 | 2 | my ($class, $version, $question_sid) = @_; | |||||||||||||||||||
| 118 | 2 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 119 | 2 | $self->{solution} = { question_sid => $question_sid }; | |||||||||||||||||||
| 120 | 2 | $self->{uri} = join q{}, '/Insights/QualityManagement/Questions/', | |||||||||||||||||||
| 121 | Twilio::Serialize::path_segment($question_sid); | ||||||||||||||||||||
| 122 | 2 | return $self; | |||||||||||||||||||
| 123 | } | ||||||||||||||||||||
| 124 | |||||||||||||||||||||
| 125 | 1 | ▶ | sub delete { | ||||||||||||||||||
|
Subroutine
delete: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 126 | 1 | my ($self, $options) = @_; | |||||||||||||||||||
| 127 | 1 | ▶ | $options //= {}; | ||||||||||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||||||||||
| 128 | $self->{version}->handle_request('DELETE', $self->{uri}, 'delete', | ||||||||||||||||||||
| 129 | 1 | { headers => { Authorization => $options->{authorization}, } }); | |||||||||||||||||||
| 130 | 1 | return 1; | |||||||||||||||||||
| 131 | } | ||||||||||||||||||||
| 132 | |||||||||||||||||||||
| 133 | 1 | ▶ | sub update { | ||||||||||||||||||
|
Subroutine
update: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 134 | 1 | my ($self, $allow_na, $options) = @_; | |||||||||||||||||||
| 135 | 1 | ▶ | $options //= {}; | ||||||||||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||||||||||
| 136 | |||||||||||||||||||||
| 137 | my $data = { | ||||||||||||||||||||
| 138 | AllowNa => Twilio::Serialize::boolean_to_string($allow_na), | ||||||||||||||||||||
| 139 | AnswerSetId => $options->{answer_set_id}, | ||||||||||||||||||||
| 140 | CategorySid => $options->{category_sid}, | ||||||||||||||||||||
| 141 | Description => $options->{description}, | ||||||||||||||||||||
| 142 | Question => $options->{question}, | ||||||||||||||||||||
| 143 | 1 | }; | |||||||||||||||||||
| 144 | |||||||||||||||||||||
| 145 | my $response = $self->{version}->handle_request( | ||||||||||||||||||||
| 146 | 'POST', | ||||||||||||||||||||
| 147 | $self->{uri}, | ||||||||||||||||||||
| 148 | 'update', | ||||||||||||||||||||
| 149 | { | ||||||||||||||||||||
| 150 | data => $data, | ||||||||||||||||||||
| 151 | headers => { Authorization => $options->{authorization}, } | ||||||||||||||||||||
| 152 | } | ||||||||||||||||||||
| 153 | 1 | ); | |||||||||||||||||||
| 154 | 1 | return $self->_build_instance($response); | |||||||||||||||||||
| 155 | } | ||||||||||||||||||||
| 156 | |||||||||||||||||||||
| 157 | 1 | ▶ | sub _build_instance { | ||||||||||||||||||
|
Subroutine
_build_instance: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 158 | 1 | my ($self, $response) = @_; | |||||||||||||||||||
| 159 | return Twilio::Rest::FlexApi::V1::InsightsQuestionnairesQuestionInstance->new($self->{version}, | ||||||||||||||||||||
| 160 | 1 | $response->get_content, $self->{solution}{question_sid}); | |||||||||||||||||||
| 161 | } | ||||||||||||||||||||
| 162 | |||||||||||||||||||||
| 163 | package Twilio::Rest::FlexApi::V1::InsightsQuestionnairesQuestionInstance; | ||||||||||||||||||||
| 164 | |||||||||||||||||||||
| 165 | 2 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 166 | |||||||||||||||||||||
| 167 | 2 | ▶ | use Twilio::Deserialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 168 | |||||||||||||||||||||
| 169 | 3 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 170 | 3 | my ($class, $version, $payload, $question_sid) = @_; | |||||||||||||||||||
| 171 | 3 | my $self = $class->SUPER::new($version, $payload); | |||||||||||||||||||
| 172 | 3 | ▶ | $self->{solution} = { question_sid => $question_sid // $self->{properties}{question_sid} }; | ||||||||||||||||||
|
Condition66%2/3
$question_sid // $self->{"properties"}{"question_sid"}
MC/DC0%0/2
$question_sid // $self->{"properties"}{"question_sid"}
$question_sid
$self->{"properties"}{"question_sid"}
Truth table66%2/3
A // B
A= $question_sidB= $self->{"properties"}{"question_sid"}
| |||||||||||||||||||||
| 173 | 3 | return $self; | |||||||||||||||||||
| 174 | } | ||||||||||||||||||||
| 175 | |||||||||||||||||||||
| 176 | 0 | ▶ | sub delete { | ||||||||||||||||||
|
Subroutine
delete: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 177 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 178 | 0 | return $self->_context->delete(@arguments); | |||||||||||||||||||
| 179 | } | ||||||||||||||||||||
| 180 | |||||||||||||||||||||
| 181 | 0 | ▶ | sub update { | ||||||||||||||||||
|
Subroutine
update: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 182 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 183 | 0 | return $self->_context->update(@arguments); | |||||||||||||||||||
| 184 | } | ||||||||||||||||||||
| 185 | |||||||||||||||||||||
| 186 | 0 | ▶ | sub _context { | ||||||||||||||||||
|
Subroutine
_context: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 187 | 0 | my ($self) = @_; | |||||||||||||||||||
| 188 | return Twilio::Rest::FlexApi::V1::InsightsQuestionnairesQuestionContext->new($self->{version}, | ||||||||||||||||||||
| 189 | 0 | $self->{solution}{question_sid}); | |||||||||||||||||||
| 190 | } | ||||||||||||||||||||
| 191 | |||||||||||||||||||||
| 192 | 3 | ▶ | sub account_sid { return $_[0]{properties}{account_sid} } | ||||||||||||||||||
|
Subroutine
account_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 193 | 3 | ▶ | sub allow_na { return $_[0]{properties}{allow_na} } | ||||||||||||||||||
|
Subroutine
allow_na: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 194 | 3 | ▶ | sub answer_set { return $_[0]{properties}{answer_set} } | ||||||||||||||||||
|
Subroutine
answer_set: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 195 | 3 | ▶ | sub answer_set_id { return $_[0]{properties}{answer_set_id} } | ||||||||||||||||||
|
Subroutine
answer_set_id: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 196 | 3 | ▶ | sub category { return $_[0]{properties}{category} } | ||||||||||||||||||
|
Subroutine
category: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 197 | 3 | ▶ | sub description { return $_[0]{properties}{description} } | ||||||||||||||||||
|
Subroutine
description: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 198 | 3 | ▶ | sub question { return $_[0]{properties}{question} } | ||||||||||||||||||
|
Subroutine
question: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 199 | 3 | ▶ | sub question_sid { return $_[0]{properties}{question_sid} } | ||||||||||||||||||
|
Subroutine
question_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 200 | 3 | ▶ | sub url { return $_[0]{properties}{url} } | ||||||||||||||||||
|
Subroutine
url: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 201 | 3 | ▶ | sub usage { return $_[0]{properties}{usage} } | ||||||||||||||||||
|
Subroutine
usage: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 202 | |||||||||||||||||||||
| 203 | 2 | 1; | |||||||||||||||||||
| 204 | |||||||||||||||||||||
| 205 | __END__ | ||||||||||||||||||||