Twilio/Rest/FlexApi/V1/Interaction/InteractionChannel/InteractionChannelInvite.pm

filter: Statementstmt 87.7% 50 / 57 Branchbran n/a Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 86.3% 19 / 22 Podpod n/a totaltotal 85.3% 70 / 82 CC 2 SCAR 2.0
CC
2
Cov
86%
page
2.0
read
2.0
stream
2.0
CRAP 1.2
« Twilio/Rest/Intelligence/V3/Version.pm ↑ Summary Twilio/Rest/Insights/V1/Room.pm »
1 # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file.
2 package Twilio::Rest::FlexApi::V1::Interaction::InteractionChannel::InteractionChannelInvite;
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::Interaction::InteractionChannel::InteractionChannelInviteList;
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, $interaction_sid, $channel_sid) = @_;
17 2 my $self = $class->SUPER::new($version);
18 2 $self->{solution} = { interaction_sid => $interaction_sid, channel_sid => $channel_sid };
19 2 $self->{uri} = join q{}, '/Interactions/', Twilio::Serialize::path_segment($interaction_sid),
20 '/Channels/', Twilio::Serialize::path_segment($channel_sid), '/Invites';
21 2 return $self;
22 }
23  
24 1 ▶sub create {
Subroutine create: called CC=1 SCAR=0.0
25 1 my ($self, $routing) = @_;
26  
27 1 my $data = { Routing => Twilio::Serialize::json_object($routing), };
28  
29 my $response =
30 1 $self->{version}->handle_request('POST', $self->{uri}, 'create', { data => $data });
31 return
32 Twilio::Rest::FlexApi::V1::Interaction::InteractionChannel::InteractionChannelInviteInstance
33 ->new(
34 $self->{version}, $response->get_content,
35 $self->{solution}{interaction_sid},
36 $self->{solution}{channel_sid}
37 1 );
38 }
39  
40 0 ▶sub read {
Subroutine read: not called CC=1 SCAR=6.9
41 0 my ($self, @arguments) = @_;
42 0 return $self->read_records(@arguments);
43 }
44  
45 0 ▶sub stream {
Subroutine stream: not called CC=1 SCAR=6.9
46 0 my ($self, @arguments) = @_;
47 0 return $self->stream_records(@arguments);
48 }
49  
50 1 ▶sub page {
Subroutine page: called CC=2 SCAR=7.0
51 1 my ($self, $options, $page_size, $page_token, $page_number) = @_;
52 1 ▶ $options //= {};
Condition50%1/2
$options //= {}
l!l
01
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
Aresult
11
00
53  
54 1 my $params = {
55 PageToken => $page_token,
56 Page => $page_number,
57 PageSize => $page_size,
58 };
59  
60 1 my $response = $self->{version}->page('GET', $self->{uri}, { params => $params });
61 1 return $self->_build_page($response);
62 }
63  
64 0 ▶sub get_page {
Subroutine get_page: not called CC=1 SCAR=6.9
65 0 my ($self, $target_url) = @_;
66 0 my $client = $self->{version}->get_domain->get_client;
67 0 return $self->_build_page($client->request('GET', $target_url));
68 }
69  
70 1 ▶sub _build_page {
Subroutine _build_page: called CC=1 SCAR=0.0
71 1 my ($self, $response) = @_;
72 return
73 Twilio::Rest::FlexApi::V1::Interaction::InteractionChannel::InteractionChannelInvitePage->new(
74 1 $self->{version}, $response, $self->{solution});
75 }
76  
77 package Twilio::Rest::FlexApi::V1::Interaction::InteractionChannel::InteractionChannelInvitePage;
78  
79 2 ▶use parent 'Twilio::Page';
Subroutine BEGIN: called CC=1 SCAR=0.0
80  
81 1 ▶sub records_key { return 'invites' }
Subroutine records_key: called CC=1 SCAR=0.0
82  
83 1 ▶sub build_instance {
Subroutine build_instance: called CC=1 SCAR=0.0
84 1 my ($self, $payload) = @_;
85 return
86 Twilio::Rest::FlexApi::V1::Interaction::InteractionChannel::InteractionChannelInviteInstance
87 ->new(
88 $self->{version}, $payload,
89 $self->{solution}{interaction_sid},
90 $self->{solution}{channel_sid}
91 1 );
92 }
93  
94 package Twilio::Rest::FlexApi::V1::Interaction::InteractionChannel::InteractionChannelInviteInstance;
95  
96 2 ▶use parent 'Twilio::InstanceResource';
Subroutine BEGIN: called CC=1 SCAR=0.0
97  
98 2 ▶use Twilio::Deserialize;
Subroutine BEGIN: called CC=1 SCAR=0.0
99  
100 2 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
101 2 my ($class, $version, $payload, $interaction_sid, $channel_sid) = @_;
102 2 my $self = $class->SUPER::new($version, $payload);
103 2 $self->{solution} = { interaction_sid => $interaction_sid, channel_sid => $channel_sid };
104 2 return $self;
105 }
106  
107 2 ▶sub channel_sid { return $_[0]{properties}{channel_sid} }
Subroutine channel_sid: called CC=1 SCAR=0.0
108 2 ▶sub interaction_sid { return $_[0]{properties}{interaction_sid} }
Subroutine interaction_sid: called CC=1 SCAR=0.0
109 2 ▶sub routing { return $_[0]{properties}{routing} }
Subroutine routing: called CC=1 SCAR=0.0
110 2 ▶sub sid { return $_[0]{properties}{sid} }
Subroutine sid: called CC=1 SCAR=0.0
111 2 ▶sub url { return $_[0]{properties}{url} }
Subroutine url: called CC=1 SCAR=0.0
112  
113 2 1;
114  
115 __END__
« Twilio/Rest/Intelligence/V3/Version.pm ↑ Summary Twilio/Rest/Insights/V1/Room.pm »