« Twilio/Rest/Chat/V1/Service/User/UserChannel.pm
↑ Summary
Twilio/Rest/IpMessaging/V1/Service/User/UserChannel.pm »
| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||
| 2 | package Twilio::Rest::Intelligence::V2::Transcript::Sentence; | ||||||||||||
| 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::V2::Transcript::SentenceList; | ||||||||||||
| 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 | 1 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||
| 16 | 1 | my ($class, $version, $transcript_sid) = @_; | |||||||||||
| 17 | 1 | my $self = $class->SUPER::new($version); | |||||||||||
| 18 | 1 | $self->{solution} = { transcript_sid => $transcript_sid }; | |||||||||||
| 19 | 1 | $self->{uri} = join q{}, '/Transcripts/', Twilio::Serialize::path_segment($transcript_sid), | |||||||||||
| 20 | '/Sentences'; | ||||||||||||
| 21 | 1 | return $self; | |||||||||||
| 22 | } | ||||||||||||
| 23 | |||||||||||||
| 24 | 0 | ▶ | sub read { | ||||||||||
|
Subroutine
read: not called CC=1 SCAR=6.9
| |||||||||||||
| 25 | 0 | my ($self, @arguments) = @_; | |||||||||||
| 26 | 0 | return $self->read_records(@arguments); | |||||||||||
| 27 | } | ||||||||||||
| 28 | |||||||||||||
| 29 | 0 | ▶ | sub stream { | ||||||||||
|
Subroutine
stream: not called CC=1 SCAR=6.9
| |||||||||||||
| 30 | 0 | my ($self, @arguments) = @_; | |||||||||||
| 31 | 0 | return $self->stream_records(@arguments); | |||||||||||
| 32 | } | ||||||||||||
| 33 | |||||||||||||
| 34 | 1 | ▶ | sub page { | ||||||||||
|
Subroutine
page: called CC=2 SCAR=7.0
| |||||||||||||
| 35 | 1 | my ($self, $options, $page_size, $page_token, $page_number) = @_; | |||||||||||
| 36 | 1 | ▶ | $options //= {}; | ||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||
| 37 | |||||||||||||
| 38 | my $params = { | ||||||||||||
| 39 | Redacted => Twilio::Serialize::boolean_to_string($options->{redacted}), | ||||||||||||
| 40 | 1 | WordTimestamps => Twilio::Serialize::boolean_to_string($options->{word_timestamps}), | |||||||||||
| 41 | PageToken => $page_token, | ||||||||||||
| 42 | Page => $page_number, | ||||||||||||
| 43 | PageSize => $page_size, | ||||||||||||
| 44 | }; | ||||||||||||
| 45 | |||||||||||||
| 46 | 1 | my $response = $self->{version}->page('GET', $self->{uri}, { params => $params }); | |||||||||||
| 47 | 1 | return $self->_build_page($response); | |||||||||||
| 48 | } | ||||||||||||
| 49 | |||||||||||||
| 50 | 0 | ▶ | sub get_page { | ||||||||||
|
Subroutine
get_page: not called CC=1 SCAR=6.9
| |||||||||||||
| 51 | 0 | my ($self, $target_url) = @_; | |||||||||||
| 52 | 0 | my $client = $self->{version}->get_domain->get_client; | |||||||||||
| 53 | 0 | return $self->_build_page($client->request('GET', $target_url)); | |||||||||||
| 54 | } | ||||||||||||
| 55 | |||||||||||||
| 56 | 1 | ▶ | sub _build_page { | ||||||||||
|
Subroutine
_build_page: called CC=1 SCAR=0.0
| |||||||||||||
| 57 | 1 | my ($self, $response) = @_; | |||||||||||
| 58 | return Twilio::Rest::Intelligence::V2::Transcript::SentencePage->new($self->{version}, $response, | ||||||||||||
| 59 | 1 | $self->{solution}); | |||||||||||
| 60 | } | ||||||||||||
| 61 | |||||||||||||
| 62 | package Twilio::Rest::Intelligence::V2::Transcript::SentencePage; | ||||||||||||
| 63 | |||||||||||||
| 64 | 2 | ▶ | use parent 'Twilio::Page'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 65 | |||||||||||||
| 66 | 1 | ▶ | sub records_key { return 'sentences' } | ||||||||||
|
Subroutine
records_key: called CC=1 SCAR=0.0
| |||||||||||||
| 67 | |||||||||||||
| 68 | 1 | ▶ | sub build_instance { | ||||||||||
|
Subroutine
build_instance: called CC=1 SCAR=0.0
| |||||||||||||
| 69 | 1 | my ($self, $payload) = @_; | |||||||||||
| 70 | return Twilio::Rest::Intelligence::V2::Transcript::SentenceInstance->new($self->{version}, | ||||||||||||
| 71 | 1 | $payload, $self->{solution}{transcript_sid}); | |||||||||||
| 72 | } | ||||||||||||
| 73 | |||||||||||||
| 74 | package Twilio::Rest::Intelligence::V2::Transcript::SentenceInstance; | ||||||||||||
| 75 | |||||||||||||
| 76 | 2 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 77 | |||||||||||||
| 78 | 2 | ▶ | use Twilio::Deserialize; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 79 | |||||||||||||
| 80 | 1 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||
| 81 | 1 | my ($class, $version, $payload, $transcript_sid) = @_; | |||||||||||
| 82 | 1 | my $self = $class->SUPER::new($version, $payload); | |||||||||||
| 83 | 1 | $self->{solution} = { transcript_sid => $transcript_sid }; | |||||||||||
| 84 | 1 | return $self; | |||||||||||
| 85 | } | ||||||||||||
| 86 | |||||||||||||
| 87 | 1 | ▶ | sub confidence { return $_[0]{properties}{confidence} } | ||||||||||
|
Subroutine
confidence: called CC=1 SCAR=0.0
| |||||||||||||
| 88 | 1 | ▶ | sub end_time { return $_[0]{properties}{end_time} } | ||||||||||
|
Subroutine
end_time: called CC=1 SCAR=0.0
| |||||||||||||
| 89 | 1 | ▶ | sub media_channel { return $_[0]{properties}{media_channel} } | ||||||||||
|
Subroutine
media_channel: called CC=1 SCAR=0.0
| |||||||||||||
| 90 | 1 | ▶ | sub sentence_index { return $_[0]{properties}{sentence_index} } | ||||||||||
|
Subroutine
sentence_index: called CC=1 SCAR=0.0
| |||||||||||||
| 91 | 1 | ▶ | sub sid { return $_[0]{properties}{sid} } | ||||||||||
|
Subroutine
sid: called CC=1 SCAR=0.0
| |||||||||||||
| 92 | 1 | ▶ | sub start_time { return $_[0]{properties}{start_time} } | ||||||||||
|
Subroutine
start_time: called CC=1 SCAR=0.0
| |||||||||||||
| 93 | 1 | ▶ | sub transcript { return $_[0]{properties}{transcript} } | ||||||||||
|
Subroutine
transcript: called CC=1 SCAR=0.0
| |||||||||||||
| 94 | 1 | ▶ | sub words { return $_[0]{properties}{words} } | ||||||||||
|
Subroutine
words: called CC=1 SCAR=0.0
| |||||||||||||
| 95 | |||||||||||||
| 96 | 2 | 1; | |||||||||||
| 97 | |||||||||||||
| 98 | __END__ | ||||||||||||