Twilio/Rest/Conversations/V1/Service/ParticipantConversation.pm

filter: Statementstmt 89.0% 57 / 64 Branchbran n/a Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 90.6% 29 / 32 Podpod n/a totaltotal 87.8% 87 / 99 CC 2 SCAR 1.4
CC
2
Cov
88%
page
2.0
read
2.0
stream
2.0
CRAP 1.2
« Twilio/Rest/Conversations/V1/ParticipantConversation.pm ↑ Summary Twilio/Rest/Wireless/V1/Sim/DataSession.pm »
1 # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file.
2 package Twilio::Rest::Conversations::V1::Service::ParticipantConversation;
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::Conversations::V1::Service::ParticipantConversationList;
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, $chat_service_sid) = @_;
17 1 my $self = $class->SUPER::new($version);
18 1 $self->{solution} = { chat_service_sid => $chat_service_sid };
19 1 $self->{uri} = join q{}, '/Services/', Twilio::Serialize::path_segment($chat_service_sid),
20 '/ParticipantConversations';
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 //= {}
l!l
10
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
Aresult
11
00
37  
38 my $params = {
39 Address => $options->{address},
40 Identity => $options->{identity},
41 1 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::Conversations::V1::Service::ParticipantConversationPage->new(
59 1 $self->{version}, $response, $self->{solution});
60 }
61  
62 package Twilio::Rest::Conversations::V1::Service::ParticipantConversationPage;
63  
64 2 ▶use parent 'Twilio::Page';
Subroutine BEGIN: called CC=1 SCAR=0.0
65  
66 1 ▶sub records_key { return 'conversations' }
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::Conversations::V1::Service::ParticipantConversationInstance->new(
71 1 $self->{version}, $payload, $self->{solution}{chat_service_sid});
72 }
73  
74 package Twilio::Rest::Conversations::V1::Service::ParticipantConversationInstance;
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, $chat_service_sid) = @_;
82 1 my $self = $class->SUPER::new($version, $payload);
83 1 $self->{solution} = { chat_service_sid => $chat_service_sid };
84 1 return $self;
85 }
86  
87 1 ▶sub account_sid { return $_[0]{properties}{account_sid} }
Subroutine account_sid: called CC=1 SCAR=0.0
88 1 ▶sub chat_service_sid { return $_[0]{properties}{chat_service_sid} }
Subroutine chat_service_sid: called CC=1 SCAR=0.0
89 1 ▶sub conversation_attributes { return $_[0]{properties}{conversation_attributes} }
Subroutine conversation_attributes: called CC=1 SCAR=0.0
90 1 ▶sub conversation_created_by { return $_[0]{properties}{conversation_created_by} }
Subroutine conversation_created_by: called CC=1 SCAR=0.0
91  
92 1 ▶sub conversation_date_created {
Subroutine conversation_date_created: called CC=1 SCAR=0.0
93 1 return Twilio::Deserialize::date_time($_[0]{properties}{conversation_date_created});
94 }
95  
96 1 ▶sub conversation_date_updated {
Subroutine conversation_date_updated: called CC=1 SCAR=0.0
97 1 return Twilio::Deserialize::date_time($_[0]{properties}{conversation_date_updated});
98 }
99 1 ▶sub conversation_friendly_name { return $_[0]{properties}{conversation_friendly_name} }
Subroutine conversation_friendly_name: called CC=1 SCAR=0.0
100 1 ▶sub conversation_sid { return $_[0]{properties}{conversation_sid} }
Subroutine conversation_sid: called CC=1 SCAR=0.0
101 1 ▶sub conversation_state { return $_[0]{properties}{conversation_state} }
Subroutine conversation_state: called CC=1 SCAR=0.0
102 1 ▶sub conversation_timers { return $_[0]{properties}{conversation_timers} }
Subroutine conversation_timers: called CC=1 SCAR=0.0
103 1 ▶sub conversation_unique_name { return $_[0]{properties}{conversation_unique_name} }
Subroutine conversation_unique_name: called CC=1 SCAR=0.0
104 1 ▶sub links { return $_[0]{properties}{links} }
Subroutine links: called CC=1 SCAR=0.0
105 1 ▶sub participant_identity { return $_[0]{properties}{participant_identity} }
Subroutine participant_identity: called CC=1 SCAR=0.0
106 1 ▶sub participant_messaging_binding { return $_[0]{properties}{participant_messaging_binding} }
Subroutine participant_messaging_binding: called CC=1 SCAR=0.0
107 1 ▶sub participant_sid { return $_[0]{properties}{participant_sid} }
Subroutine participant_sid: called CC=1 SCAR=0.0
108 1 ▶sub participant_user_sid { return $_[0]{properties}{participant_user_sid} }
Subroutine participant_user_sid: called CC=1 SCAR=0.0
109  
110 2 1;
111  
112 __END__
« Twilio/Rest/Conversations/V1/ParticipantConversation.pm ↑ Summary Twilio/Rest/Wireless/V1/Sim/DataSession.pm »