« Twilio/Rest/Conversations/V1/Service/Binding.pm
↑ Summary
Twilio/Rest/Messaging/V1/Service/ChannelSender.pm »
| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||||||||||
| 2 | package Twilio::Rest::Intelligence::V3::OperatorResult; | ||||||||||||||||||||
| 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::Intelligence::V3::OperatorResultList; | ||||||||||||||||||||
| 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 | 3 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 16 | 3 | my ($class, $version) = @_; | |||||||||||||||||||
| 17 | 3 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 18 | 3 | $self->{solution} = {}; | |||||||||||||||||||
| 19 | 3 | $self->{uri} = '/OperatorResults'; | |||||||||||||||||||
| 20 | 3 | return $self; | |||||||||||||||||||
| 21 | } | ||||||||||||||||||||
| 22 | |||||||||||||||||||||
| 23 | 0 | ▶ | sub read { | ||||||||||||||||||
|
Subroutine
read: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 24 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 25 | 0 | return $self->read_records(@arguments); | |||||||||||||||||||
| 26 | } | ||||||||||||||||||||
| 27 | |||||||||||||||||||||
| 28 | 0 | ▶ | sub stream { | ||||||||||||||||||
|
Subroutine
stream: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 29 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 30 | 0 | return $self->stream_records(@arguments); | |||||||||||||||||||
| 31 | } | ||||||||||||||||||||
| 32 | |||||||||||||||||||||
| 33 | 1 | ▶ | sub page { | ||||||||||||||||||
|
Subroutine
page: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 34 | 1 | my ($self, $options, $page_size, $page_token) = @_; | |||||||||||||||||||
| 35 | 1 | ▶ | $options //= {}; | ||||||||||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||||||||||
| 36 | |||||||||||||||||||||
| 37 | my $params = { | ||||||||||||||||||||
| 38 | conversationId => $options->{conversation_id}, | ||||||||||||||||||||
| 39 | intelligenceConfigurationId => $options->{intelligence_configuration_id}, | ||||||||||||||||||||
| 40 | operatorId => $options->{operator_id}, | ||||||||||||||||||||
| 41 | 1 | pageSize => $page_size, | |||||||||||||||||||
| 42 | pageToken => $page_token, | ||||||||||||||||||||
| 43 | }; | ||||||||||||||||||||
| 44 | |||||||||||||||||||||
| 45 | 1 | my $response = $self->{version}->page('GET', $self->{uri}, { params => $params }); | |||||||||||||||||||
| 46 | 1 | return $self->_build_page($response); | |||||||||||||||||||
| 47 | } | ||||||||||||||||||||
| 48 | |||||||||||||||||||||
| 49 | 0 | ▶ | sub get_page { | ||||||||||||||||||
|
Subroutine
get_page: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 50 | 0 | my ($self, $target_url) = @_; | |||||||||||||||||||
| 51 | 0 | my $client = $self->{version}->get_domain->get_client; | |||||||||||||||||||
| 52 | 0 | return $self->_build_page($client->request('GET', $target_url)); | |||||||||||||||||||
| 53 | } | ||||||||||||||||||||
| 54 | |||||||||||||||||||||
| 55 | 1 | ▶ | sub _build_page { | ||||||||||||||||||
|
Subroutine
_build_page: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 56 | 1 | my ($self, $response) = @_; | |||||||||||||||||||
| 57 | return Twilio::Rest::Intelligence::V3::OperatorResultPage->new($self->{version}, $response, | ||||||||||||||||||||
| 58 | 1 | $self->{solution}); | |||||||||||||||||||
| 59 | } | ||||||||||||||||||||
| 60 | |||||||||||||||||||||
| 61 | 2 | ▶ | sub get_context { | ||||||||||||||||||
|
Subroutine
get_context: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 62 | 2 | my ($self, $operator_result_id) = @_; | |||||||||||||||||||
| 63 | return Twilio::Rest::Intelligence::V3::OperatorResultContext->new($self->{version}, | ||||||||||||||||||||
| 64 | 2 | $operator_result_id); | |||||||||||||||||||
| 65 | } | ||||||||||||||||||||
| 66 | |||||||||||||||||||||
| 67 | package Twilio::Rest::Intelligence::V3::OperatorResultPage; | ||||||||||||||||||||
| 68 | |||||||||||||||||||||
| 69 | 2 | ▶ | use parent 'Twilio::TokenPaginationPage'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 70 | |||||||||||||||||||||
| 71 | 1 | ▶ | sub records_key { return 'items' } | ||||||||||||||||||
|
Subroutine
records_key: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 72 | |||||||||||||||||||||
| 73 | 1 | ▶ | sub build_instance { | ||||||||||||||||||
|
Subroutine
build_instance: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 74 | 1 | my ($self, $payload) = @_; | |||||||||||||||||||
| 75 | 1 | return Twilio::Rest::Intelligence::V3::OperatorResultInstance->new($self->{version}, $payload); | |||||||||||||||||||
| 76 | } | ||||||||||||||||||||
| 77 | |||||||||||||||||||||
| 78 | package Twilio::Rest::Intelligence::V3::OperatorResultContext; | ||||||||||||||||||||
| 79 | |||||||||||||||||||||
| 80 | 2 | ▶ | use parent 'Twilio::InstanceContext'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 81 | |||||||||||||||||||||
| 82 | 2 | ▶ | use Twilio::Serialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 83 | |||||||||||||||||||||
| 84 | 2 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 85 | 2 | my ($class, $version, $operator_result_id) = @_; | |||||||||||||||||||
| 86 | 2 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 87 | 2 | $self->{solution} = { operator_result_id => $operator_result_id }; | |||||||||||||||||||
| 88 | 2 | $self->{uri} = join q{}, '/OperatorResults/', | |||||||||||||||||||
| 89 | Twilio::Serialize::path_segment($operator_result_id); | ||||||||||||||||||||
| 90 | 2 | return $self; | |||||||||||||||||||
| 91 | } | ||||||||||||||||||||
| 92 | |||||||||||||||||||||
| 93 | 1 | ▶ | sub delete { | ||||||||||||||||||
|
Subroutine
delete: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 94 | 1 | my ($self) = @_; | |||||||||||||||||||
| 95 | 1 | $self->{version}->handle_request('DELETE', $self->{uri}, 'delete'); | |||||||||||||||||||
| 96 | 1 | return 1; | |||||||||||||||||||
| 97 | } | ||||||||||||||||||||
| 98 | |||||||||||||||||||||
| 99 | 1 | ▶ | sub fetch { | ||||||||||||||||||
|
Subroutine
fetch: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 100 | 1 | my ($self) = @_; | |||||||||||||||||||
| 101 | |||||||||||||||||||||
| 102 | 1 | my $response = $self->{version}->handle_request('GET', $self->{uri}, 'fetch'); | |||||||||||||||||||
| 103 | 1 | return $self->_build_instance($response); | |||||||||||||||||||
| 104 | } | ||||||||||||||||||||
| 105 | |||||||||||||||||||||
| 106 | 1 | ▶ | sub _build_instance { | ||||||||||||||||||
|
Subroutine
_build_instance: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 107 | 1 | my ($self, $response) = @_; | |||||||||||||||||||
| 108 | return Twilio::Rest::Intelligence::V3::OperatorResultInstance->new($self->{version}, | ||||||||||||||||||||
| 109 | 1 | $response->get_content, $self->{solution}{operator_result_id}); | |||||||||||||||||||
| 110 | } | ||||||||||||||||||||
| 111 | |||||||||||||||||||||
| 112 | package Twilio::Rest::Intelligence::V3::OperatorResultInstance; | ||||||||||||||||||||
| 113 | |||||||||||||||||||||
| 114 | 2 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 115 | |||||||||||||||||||||
| 116 | 2 | ▶ | use Twilio::Deserialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 117 | |||||||||||||||||||||
| 118 | 2 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 119 | 2 | my ($class, $version, $payload, $operator_result_id) = @_; | |||||||||||||||||||
| 120 | 2 | my $self = $class->SUPER::new($version, $payload); | |||||||||||||||||||
| 121 | 2 | ▶ | $self->{solution} = { operator_result_id => $operator_result_id // $self->{properties}{id} }; | ||||||||||||||||||
|
Condition66%2/3
$operator_result_id // $self->{"properties"}{"id"}
MC/DC0%0/2
$operator_result_id // $self->{"properties"}{"id"}
$operator_result_id
$self->{"properties"}{"id"}
Truth table66%2/3
A // B
A= $operator_result_idB= $self->{"properties"}{"id"}
| |||||||||||||||||||||
| 122 | 2 | return $self; | |||||||||||||||||||
| 123 | } | ||||||||||||||||||||
| 124 | |||||||||||||||||||||
| 125 | 0 | ▶ | sub delete { | ||||||||||||||||||
|
Subroutine
delete: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 126 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 127 | 0 | return $self->_context->delete(@arguments); | |||||||||||||||||||
| 128 | } | ||||||||||||||||||||
| 129 | |||||||||||||||||||||
| 130 | 0 | ▶ | sub fetch { | ||||||||||||||||||
|
Subroutine
fetch: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 131 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 132 | 0 | return $self->_context->fetch(@arguments); | |||||||||||||||||||
| 133 | } | ||||||||||||||||||||
| 134 | |||||||||||||||||||||
| 135 | 0 | ▶ | sub _context { | ||||||||||||||||||
|
Subroutine
_context: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 136 | 0 | my ($self) = @_; | |||||||||||||||||||
| 137 | return Twilio::Rest::Intelligence::V3::OperatorResultContext->new($self->{version}, | ||||||||||||||||||||
| 138 | 0 | $self->{solution}{operator_result_id}); | |||||||||||||||||||
| 139 | } | ||||||||||||||||||||
| 140 | |||||||||||||||||||||
| 141 | 2 | ▶ | sub account_id { return $_[0]{properties}{accountId} } | ||||||||||||||||||
|
Subroutine
account_id: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 142 | 2 | ▶ | sub conversation_id { return $_[0]{properties}{conversationId} } | ||||||||||||||||||
|
Subroutine
conversation_id: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 143 | 2 | ▶ | sub date_created { return Twilio::Deserialize::date_time($_[0]{properties}{dateCreated}) } | ||||||||||||||||||
|
Subroutine
date_created: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 144 | 2 | ▶ | sub execution_details { return $_[0]{properties}{executionDetails} } | ||||||||||||||||||
|
Subroutine
execution_details: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 145 | 2 | ▶ | sub id { return $_[0]{properties}{id} } | ||||||||||||||||||
|
Subroutine
id: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 146 | 2 | ▶ | sub intelligence_configuration { return $_[0]{properties}{intelligenceConfiguration} } | ||||||||||||||||||
|
Subroutine
intelligence_configuration: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 147 | 2 | ▶ | sub metadata { return $_[0]{properties}{metadata} } | ||||||||||||||||||
|
Subroutine
metadata: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 148 | 2 | ▶ | sub operator { return $_[0]{properties}{operator} } | ||||||||||||||||||
|
Subroutine
operator: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 149 | 2 | ▶ | sub output_format { return $_[0]{properties}{outputFormat} } | ||||||||||||||||||
|
Subroutine
output_format: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 150 | 2 | ▶ | sub reference_ids { return $_[0]{properties}{referenceIds} } | ||||||||||||||||||
|
Subroutine
reference_ids: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 151 | 2 | ▶ | sub result { return $_[0]{properties}{result} } | ||||||||||||||||||
|
Subroutine
result: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 152 | |||||||||||||||||||||
| 153 | 2 | 1; | |||||||||||||||||||
| 154 | |||||||||||||||||||||
| 155 | __END__ | ||||||||||||||||||||