Twilio/Rest/Bulkexports/V1/ExportConfiguration.pm

filter: Statementstmt 87.7% 43 / 49 Branchbran n/a Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 84.2% 16 / 19 Podpod n/a totaltotal 84.5% 60 / 71 CC 2 SCAR 2.2
CC
2
Cov
86%
update
2.0
fetch
2.0
update
2.0
CRAP 1.3
« Twilio/Rest/Memory/V1/DataMapping.pm ↑ Summary Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber.pm »
1 # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file.
2 package Twilio::Rest::Bulkexports::V1::ExportConfiguration;
3  
4 3 ▶use 5.016;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 3 our $VERSION = '2.001';
8  
9 package Twilio::Rest::Bulkexports::V1::ExportConfigurationContext;
10  
11 3 ▶use parent 'Twilio::InstanceContext';
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 3 ▶use Twilio::Serialize;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 3 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
16 3 my ($class, $version, $resource_type) = @_;
17 3 my $self = $class->SUPER::new($version);
18 3 $self->{solution} = { resource_type => $resource_type };
19 3 $self->{uri} = join q{}, '/Exports/', Twilio::Serialize::path_segment($resource_type),
20 '/Configuration';
21 3 return $self;
22 }
23  
24 2 ▶sub fetch {
Subroutine fetch: called CC=1 SCAR=0.0
25 2 my ($self) = @_;
26  
27 2 my $response = $self->{version}->handle_request('GET', $self->{uri}, 'fetch');
28 2 return $self->_build_instance($response);
29 }
30  
31 1 ▶sub update {
Subroutine update: called CC=2 SCAR=7.0
32 1 my ($self, $options) = @_;
33 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
34  
35 my $data = {
36 Enabled => Twilio::Serialize::boolean_to_string($options->{enabled}),
37 WebhookMethod => $options->{webhook_method},
38 WebhookUrl => $options->{webhook_url},
39 1 };
40  
41 my $response =
42 1 $self->{version}->handle_request('POST', $self->{uri}, 'update', { data => $data });
43 1 return $self->_build_instance($response);
44 }
45  
46 3 ▶sub _build_instance {
Subroutine _build_instance: called CC=1 SCAR=0.0
47 3 my ($self, $response) = @_;
48 return Twilio::Rest::Bulkexports::V1::ExportConfigurationInstance->new($self->{version},
49 3 $response->get_content, $self->{solution}{resource_type});
50 }
51  
52 package Twilio::Rest::Bulkexports::V1::ExportConfigurationInstance;
53  
54 3 ▶use parent 'Twilio::InstanceResource';
Subroutine BEGIN: called CC=1 SCAR=0.0
55  
56 3 ▶use Twilio::Deserialize;
Subroutine BEGIN: called CC=1 SCAR=0.0
57  
58 3 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
59 3 my ($class, $version, $payload, $resource_type) = @_;
60 3 my $self = $class->SUPER::new($version, $payload);
61 3 $self->{solution} = { resource_type => $resource_type };
62 3 return $self;
63 }
64  
65 0 ▶sub fetch {
Subroutine fetch: not called CC=1 SCAR=6.9
66 0 my ($self, @arguments) = @_;
67 0 return $self->_context->fetch(@arguments);
68 }
69  
70 0 ▶sub update {
Subroutine update: not called CC=1 SCAR=6.9
71 0 my ($self, @arguments) = @_;
72 0 return $self->_context->update(@arguments);
73 }
74  
75 0 ▶sub _context {
Subroutine _context: not called CC=1 SCAR=6.9
76 0 my ($self) = @_;
77 return Twilio::Rest::Bulkexports::V1::ExportConfigurationContext->new($self->{version},
78 0 $self->{solution}{resource_type});
79 }
80  
81 2 ▶sub enabled { return $_[0]{properties}{enabled} }
Subroutine enabled: called CC=1 SCAR=0.0
82 2 ▶sub resource_type { return $_[0]{properties}{resource_type} }
Subroutine resource_type: called CC=1 SCAR=0.0
83 2 ▶sub url { return $_[0]{properties}{url} }
Subroutine url: called CC=1 SCAR=0.0
84 2 ▶sub webhook_method { return $_[0]{properties}{webhook_method} }
Subroutine webhook_method: called CC=1 SCAR=0.0
85 2 ▶sub webhook_url { return $_[0]{properties}{webhook_url} }
Subroutine webhook_url: called CC=1 SCAR=0.0
86  
87 3 1;
88  
89 __END__
« Twilio/Rest/Memory/V1/DataMapping.pm ↑ Summary Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber.pm »