Twilio/Rest/Messaging/V1/LinkshorteningMessagingServiceDomainAssociation.pm

filter: Statementstmt 90.0% 36 / 40 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 86.6% 13 / 15 Podpod n/a totaltotal 89.0% 49 / 55 CC 1 SCAR 1.3
CC
1
Cov
90%
fetch
2.0
_context
2.0
BEGIN
1.0
CRAP 1.1
« Twilio/Rest/Intelligence/V2/OperatorAttachments.pm ↑ Summary Twilio/Rest/FlexApi/V1/Interaction/InteractionChannel/InteractionTransfer.pm »
1 # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file.
2 package Twilio::Rest::Messaging::V1::LinkshorteningMessagingServiceDomainAssociation;
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::Messaging::V1::LinkshorteningMessagingServiceDomainAssociationContext;
10  
11 2 ▶use parent 'Twilio::InstanceContext';
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, $messaging_service_sid) = @_;
17 1 my $self = $class->SUPER::new($version);
18 1 $self->{solution} = { messaging_service_sid => $messaging_service_sid };
19 1 $self->{uri} = join q{}, '/LinkShortening/MessagingServices/',
20 Twilio::Serialize::path_segment($messaging_service_sid), '/Domain';
21 1 return $self;
22 }
23  
24 1 ▶sub fetch {
Subroutine fetch: called CC=1 SCAR=0.0
25 1 my ($self) = @_;
26  
27 1 my $response = $self->{version}->handle_request('GET', $self->{uri}, 'fetch');
28 1 return $self->_build_instance($response);
29 }
30  
31 1 ▶sub _build_instance {
Subroutine _build_instance: called CC=1 SCAR=0.0
32 1 my ($self, $response) = @_;
33 return Twilio::Rest::Messaging::V1::LinkshorteningMessagingServiceDomainAssociationInstance->new(
34 1 $self->{version}, $response->get_content, $self->{solution}{messaging_service_sid});
35 }
36  
37 package Twilio::Rest::Messaging::V1::LinkshorteningMessagingServiceDomainAssociationInstance;
38  
39 2 ▶use parent 'Twilio::InstanceResource';
Subroutine BEGIN: called CC=1 SCAR=0.0
40  
41 2 ▶use Twilio::Deserialize;
Subroutine BEGIN: called CC=1 SCAR=0.0
42  
43 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
44 1 my ($class, $version, $payload, $messaging_service_sid) = @_;
45 1 my $self = $class->SUPER::new($version, $payload);
46 1 $self->{solution} = { messaging_service_sid => $messaging_service_sid };
47 1 return $self;
48 }
49  
50 0 ▶sub fetch {
Subroutine fetch: not called CC=1 SCAR=6.9
51 0 my ($self, @arguments) = @_;
52 0 return $self->_context->fetch(@arguments);
53 }
54  
55 0 ▶sub _context {
Subroutine _context: not called CC=1 SCAR=6.9
56 0 my ($self) = @_;
57 return Twilio::Rest::Messaging::V1::LinkshorteningMessagingServiceDomainAssociationContext->new(
58 0 $self->{version}, $self->{solution}{messaging_service_sid});
59 }
60  
61 1 ▶sub domain_sid { return $_[0]{properties}{domain_sid} }
Subroutine domain_sid: called CC=1 SCAR=0.0
62 1 ▶sub messaging_service_sid { return $_[0]{properties}{messaging_service_sid} }
Subroutine messaging_service_sid: called CC=1 SCAR=0.0
63 1 ▶sub url { return $_[0]{properties}{url} }
Subroutine url: called CC=1 SCAR=0.0
64  
65 2 1;
66  
67 __END__
« Twilio/Rest/Intelligence/V2/OperatorAttachments.pm ↑ Summary Twilio/Rest/FlexApi/V1/Interaction/InteractionChannel/InteractionTransfer.pm »