Twilio/Rest/FlexApi/V2/WebChannels.pm

filter: Statementstmt 100% 35 / 35 Branchbran n/a Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 100% 11 / 11 Podpod n/a totaltotal 95.9% 47 / 49 CC 2 SCAR 1.6
CC
2
Cov
97%
create
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« Twilio/Rest/FlexApi/V1/PluginVersionArchive.pm ↑ Summary Twilio/Rest/Accounts/V1/MessagingGeopermissions.pm »
1 # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file.
2 package Twilio::Rest::FlexApi::V2::WebChannels;
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::V2::WebChannelsList;
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) = @_;
17 1 my $self = $class->SUPER::new($version);
18 1 $self->{solution} = {};
19 1 $self->{uri} = '/WebChats';
20 1 return $self;
21 }
22  
23 1 ▶sub create {
Subroutine create: called CC=2 SCAR=7.0
24 1 my ($self, $address_sid, $options) = @_;
25 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
26  
27 my $data = {
28 AddressSid => $address_sid,
29 ChatFriendlyName => $options->{chat_friendly_name},
30 CustomerFriendlyName => $options->{customer_friendly_name},
31 Identity => $options->{identity},
32 PreEngagementData => $options->{pre_engagement_data},
33 1 };
34  
35 my $response = $self->{version}->handle_request(
36 'POST',
37 $self->{uri},
38 'create',
39 {
40 data => $data,
41 headers => { 'Ui-Version' => $options->{ui_version}, }
42 }
43 1 );
44 return Twilio::Rest::FlexApi::V2::WebChannelsInstance->new($self->{version},
45 1 $response->get_content);
46 }
47  
48 package Twilio::Rest::FlexApi::V2::WebChannelsInstance;
49  
50 2 ▶use parent 'Twilio::InstanceResource';
Subroutine BEGIN: called CC=1 SCAR=0.0
51  
52 2 ▶use Twilio::Deserialize;
Subroutine BEGIN: called CC=1 SCAR=0.0
53  
54 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
55 1 my ($class, $version, $payload) = @_;
56 1 my $self = $class->SUPER::new($version, $payload);
57 1 $self->{solution} = {};
58 1 return $self;
59 }
60  
61 1 ▶sub conversation_sid { return $_[0]{properties}{conversation_sid} }
Subroutine conversation_sid: called CC=1 SCAR=0.0
62 1 ▶sub identity { return $_[0]{properties}{identity} }
Subroutine identity: called CC=1 SCAR=0.0
63  
64 2 1;
65  
66 __END__
« Twilio/Rest/FlexApi/V1/PluginVersionArchive.pm ↑ Summary Twilio/Rest/Accounts/V1/MessagingGeopermissions.pm »