| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||||||||||
| 2 | package Twilio::Rest::Api::V2010::Account::Call::Transcription; | ||||||||||||||||||||
| 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::Api::V2010::Account::Call::TranscriptionList; | ||||||||||||||||||||
| 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 | 2 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 16 | 2 | my ($class, $version, $account_sid, $call_sid) = @_; | |||||||||||||||||||
| 17 | 2 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 18 | 2 | $self->{solution} = { account_sid => $account_sid, call_sid => $call_sid }; | |||||||||||||||||||
| 19 | 2 | $self->{uri} = join q{}, '/Accounts/', Twilio::Serialize::path_segment($account_sid), '/Calls/', | |||||||||||||||||||
| 20 | Twilio::Serialize::path_segment($call_sid), '/Transcriptions.json'; | ||||||||||||||||||||
| 21 | 2 | return $self; | |||||||||||||||||||
| 22 | } | ||||||||||||||||||||
| 23 | |||||||||||||||||||||
| 24 | 1 | ▶ | sub create { | ||||||||||||||||||
|
Subroutine
create: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 25 | 1 | my ($self, $options) = @_; | |||||||||||||||||||
| 26 | 1 | ▶ | $options //= {}; | ||||||||||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||||||||||
| 27 | |||||||||||||||||||||
| 28 | my $data = { | ||||||||||||||||||||
| 29 | ConversationConfiguration => $options->{conversation_configuration}, | ||||||||||||||||||||
| 30 | ConversationId => $options->{conversation_id}, | ||||||||||||||||||||
| 31 | EnableAutomaticPunctuation => | ||||||||||||||||||||
| 32 | Twilio::Serialize::boolean_to_string($options->{enable_automatic_punctuation}), | ||||||||||||||||||||
| 33 | EnableProviderData => Twilio::Serialize::boolean_to_string($options->{enable_provider_data}), | ||||||||||||||||||||
| 34 | Hints => $options->{hints}, | ||||||||||||||||||||
| 35 | InboundTrackLabel => $options->{inbound_track_label}, | ||||||||||||||||||||
| 36 | IntelligenceService => $options->{intelligence_service}, | ||||||||||||||||||||
| 37 | LanguageCode => $options->{language_code}, | ||||||||||||||||||||
| 38 | Name => $options->{name}, | ||||||||||||||||||||
| 39 | OutboundTrackLabel => $options->{outbound_track_label}, | ||||||||||||||||||||
| 40 | PartialResults => Twilio::Serialize::boolean_to_string($options->{partial_results}), | ||||||||||||||||||||
| 41 | ProfanityFilter => Twilio::Serialize::boolean_to_string($options->{profanity_filter}), | ||||||||||||||||||||
| 42 | SpeechModel => $options->{speech_model}, | ||||||||||||||||||||
| 43 | StatusCallbackMethod => $options->{status_callback_method}, | ||||||||||||||||||||
| 44 | StatusCallbackUrl => $options->{status_callback_url}, | ||||||||||||||||||||
| 45 | Track => $options->{track}, | ||||||||||||||||||||
| 46 | TranscriptionConfigurationId => $options->{transcription_configuration_id}, | ||||||||||||||||||||
| 47 | TranscriptionEngine => $options->{transcription_engine}, | ||||||||||||||||||||
| 48 | 1 | }; | |||||||||||||||||||
| 49 | |||||||||||||||||||||
| 50 | my $response = | ||||||||||||||||||||
| 51 | 1 | $self->{version}->handle_request('POST', $self->{uri}, 'create', { data => $data }); | |||||||||||||||||||
| 52 | return Twilio::Rest::Api::V2010::Account::Call::TranscriptionInstance->new( | ||||||||||||||||||||
| 53 | $self->{version}, $response->get_content, | ||||||||||||||||||||
| 54 | $self->{solution}{account_sid}, | ||||||||||||||||||||
| 55 | $self->{solution}{call_sid} | ||||||||||||||||||||
| 56 | 1 | ); | |||||||||||||||||||
| 57 | } | ||||||||||||||||||||
| 58 | |||||||||||||||||||||
| 59 | 1 | ▶ | sub get_context { | ||||||||||||||||||
|
Subroutine
get_context: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 60 | 1 | my ($self, $sid) = @_; | |||||||||||||||||||
| 61 | return Twilio::Rest::Api::V2010::Account::Call::TranscriptionContext->new( | ||||||||||||||||||||
| 62 | $self->{version}, | ||||||||||||||||||||
| 63 | $self->{solution}{account_sid}, | ||||||||||||||||||||
| 64 | 1 | $self->{solution}{call_sid}, $sid | |||||||||||||||||||
| 65 | ); | ||||||||||||||||||||
| 66 | } | ||||||||||||||||||||
| 67 | |||||||||||||||||||||
| 68 | package Twilio::Rest::Api::V2010::Account::Call::TranscriptionContext; | ||||||||||||||||||||
| 69 | |||||||||||||||||||||
| 70 | 2 | ▶ | use parent 'Twilio::InstanceContext'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 71 | |||||||||||||||||||||
| 72 | 2 | ▶ | use Twilio::Serialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 73 | |||||||||||||||||||||
| 74 | 1 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 75 | 1 | my ($class, $version, $account_sid, $call_sid, $sid) = @_; | |||||||||||||||||||
| 76 | 1 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 77 | 1 | $self->{solution} = { account_sid => $account_sid, call_sid => $call_sid, sid => $sid }; | |||||||||||||||||||
| 78 | 1 | $self->{uri} = join q{}, '/Accounts/', Twilio::Serialize::path_segment($account_sid), '/Calls/', | |||||||||||||||||||
| 79 | Twilio::Serialize::path_segment($call_sid), '/Transcriptions/', | ||||||||||||||||||||
| 80 | Twilio::Serialize::path_segment($sid), '.json'; | ||||||||||||||||||||
| 81 | 1 | return $self; | |||||||||||||||||||
| 82 | } | ||||||||||||||||||||
| 83 | |||||||||||||||||||||
| 84 | 1 | ▶ | sub update { | ||||||||||||||||||
|
Subroutine
update: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 85 | 1 | my ($self, $status) = @_; | |||||||||||||||||||
| 86 | |||||||||||||||||||||
| 87 | 1 | my $data = { Status => $status, }; | |||||||||||||||||||
| 88 | |||||||||||||||||||||
| 89 | my $response = | ||||||||||||||||||||
| 90 | 1 | $self->{version}->handle_request('POST', $self->{uri}, 'update', { data => $data }); | |||||||||||||||||||
| 91 | 1 | return $self->_build_instance($response); | |||||||||||||||||||
| 92 | } | ||||||||||||||||||||
| 93 | |||||||||||||||||||||
| 94 | 1 | ▶ | sub _build_instance { | ||||||||||||||||||
|
Subroutine
_build_instance: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 95 | 1 | my ($self, $response) = @_; | |||||||||||||||||||
| 96 | return Twilio::Rest::Api::V2010::Account::Call::TranscriptionInstance->new( | ||||||||||||||||||||
| 97 | $self->{version}, $response->get_content, | ||||||||||||||||||||
| 98 | $self->{solution}{account_sid}, | ||||||||||||||||||||
| 99 | $self->{solution}{call_sid}, | ||||||||||||||||||||
| 100 | $self->{solution}{sid} | ||||||||||||||||||||
| 101 | 1 | ); | |||||||||||||||||||
| 102 | } | ||||||||||||||||||||
| 103 | |||||||||||||||||||||
| 104 | package Twilio::Rest::Api::V2010::Account::Call::TranscriptionInstance; | ||||||||||||||||||||
| 105 | |||||||||||||||||||||
| 106 | 2 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 107 | |||||||||||||||||||||
| 108 | 2 | ▶ | use Twilio::Deserialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 109 | |||||||||||||||||||||
| 110 | 2 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 111 | 2 | my ($class, $version, $payload, $account_sid, $call_sid, $sid) = @_; | |||||||||||||||||||
| 112 | 2 | my $self = $class->SUPER::new($version, $payload); | |||||||||||||||||||
| 113 | $self->{solution} = | ||||||||||||||||||||
| 114 | 2 | ▶ | { account_sid => $account_sid, call_sid => $call_sid, sid => $sid // $self->{properties}{sid} }; | ||||||||||||||||||
|
Condition66%2/3
$sid // $self->{"properties"}{"sid"}
MC/DC0%0/2
$sid // $self->{"properties"}{"sid"}
$sid
$self->{"properties"}{"sid"}
Truth table66%2/3
A // B
A= $sidB= $self->{"properties"}{"sid"}
| |||||||||||||||||||||
| 115 | 2 | return $self; | |||||||||||||||||||
| 116 | } | ||||||||||||||||||||
| 117 | |||||||||||||||||||||
| 118 | 0 | ▶ | sub update { | ||||||||||||||||||
|
Subroutine
update: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 119 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 120 | 0 | return $self->_context->update(@arguments); | |||||||||||||||||||
| 121 | } | ||||||||||||||||||||
| 122 | |||||||||||||||||||||
| 123 | 0 | ▶ | sub _context { | ||||||||||||||||||
|
Subroutine
_context: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 124 | 0 | my ($self) = @_; | |||||||||||||||||||
| 125 | return Twilio::Rest::Api::V2010::Account::Call::TranscriptionContext->new( | ||||||||||||||||||||
| 126 | $self->{version}, | ||||||||||||||||||||
| 127 | $self->{solution}{account_sid}, | ||||||||||||||||||||
| 128 | $self->{solution}{call_sid}, | ||||||||||||||||||||
| 129 | $self->{solution}{sid} | ||||||||||||||||||||
| 130 | 0 | ); | |||||||||||||||||||
| 131 | } | ||||||||||||||||||||
| 132 | |||||||||||||||||||||
| 133 | 2 | ▶ | sub account_sid { return $_[0]{properties}{account_sid} } | ||||||||||||||||||
|
Subroutine
account_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 134 | 2 | ▶ | sub call_sid { return $_[0]{properties}{call_sid} } | ||||||||||||||||||
|
Subroutine
call_sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 135 | 2 | ▶ | sub date_updated { return Twilio::Deserialize::date_time($_[0]{properties}{date_updated}) } | ||||||||||||||||||
|
Subroutine
date_updated: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 136 | 2 | ▶ | sub name { return $_[0]{properties}{name} } | ||||||||||||||||||
|
Subroutine
name: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 137 | 2 | ▶ | sub sid { return $_[0]{properties}{sid} } | ||||||||||||||||||
|
Subroutine
sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 138 | 2 | ▶ | sub status { return $_[0]{properties}{status} } | ||||||||||||||||||
|
Subroutine
status: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 139 | 2 | ▶ | sub uri { return $_[0]{properties}{uri} } | ||||||||||||||||||
|
Subroutine
uri: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 140 | |||||||||||||||||||||
| 141 | 2 | 1; | |||||||||||||||||||
| 142 | |||||||||||||||||||||
| 143 | __END__ | ||||||||||||||||||||