« Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber.pm
↑ Summary
Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/BundleCopy.pm »
| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||||||||||
| 2 | package Twilio::Rest::Marketplace::V1::ModuleDataManagement; | ||||||||||||||||||||
| 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::Marketplace::V1::ModuleDataManagementList; | ||||||||||||||||||||
| 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) = @_; | |||||||||||||||||||
| 17 | 2 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 18 | 2 | $self->{solution} = {}; | |||||||||||||||||||
| 19 | 2 | $self->{uri} = '/Listing'; | |||||||||||||||||||
| 20 | 2 | return $self; | |||||||||||||||||||
| 21 | } | ||||||||||||||||||||
| 22 | |||||||||||||||||||||
| 23 | 2 | ▶ | sub get_context { | ||||||||||||||||||
|
Subroutine
get_context: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 24 | 2 | my ($self, $sid) = @_; | |||||||||||||||||||
| 25 | 2 | return Twilio::Rest::Marketplace::V1::ModuleDataManagementContext->new($self->{version}, $sid); | |||||||||||||||||||
| 26 | } | ||||||||||||||||||||
| 27 | |||||||||||||||||||||
| 28 | package Twilio::Rest::Marketplace::V1::ModuleDataManagementContext; | ||||||||||||||||||||
| 29 | |||||||||||||||||||||
| 30 | 2 | ▶ | use parent 'Twilio::InstanceContext'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 31 | |||||||||||||||||||||
| 32 | 2 | ▶ | use Twilio::Serialize; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 33 | |||||||||||||||||||||
| 34 | 2 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 35 | 2 | my ($class, $version, $sid) = @_; | |||||||||||||||||||
| 36 | 2 | my $self = $class->SUPER::new($version); | |||||||||||||||||||
| 37 | 2 | $self->{solution} = { sid => $sid }; | |||||||||||||||||||
| 38 | 2 | $self->{uri} = join q{}, '/Listing/', Twilio::Serialize::path_segment($sid); | |||||||||||||||||||
| 39 | 2 | return $self; | |||||||||||||||||||
| 40 | } | ||||||||||||||||||||
| 41 | |||||||||||||||||||||
| 42 | 1 | ▶ | sub fetch { | ||||||||||||||||||
|
Subroutine
fetch: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 43 | 1 | my ($self) = @_; | |||||||||||||||||||
| 44 | |||||||||||||||||||||
| 45 | 1 | my $response = $self->{version}->handle_request('GET', $self->{uri}, 'fetch'); | |||||||||||||||||||
| 46 | 1 | return $self->_build_instance($response); | |||||||||||||||||||
| 47 | } | ||||||||||||||||||||
| 48 | |||||||||||||||||||||
| 49 | 1 | ▶ | sub update { | ||||||||||||||||||
|
Subroutine
update: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 50 | 1 | my ($self, $options) = @_; | |||||||||||||||||||
| 51 | 1 | ▶ | $options //= {}; | ||||||||||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||||||||||
| 52 | |||||||||||||||||||||
| 53 | my $data = { | ||||||||||||||||||||
| 54 | Configuration => $options->{configuration}, | ||||||||||||||||||||
| 55 | Description => $options->{description}, | ||||||||||||||||||||
| 56 | Documentation => $options->{documentation}, | ||||||||||||||||||||
| 57 | ModuleInfo => $options->{module_info}, | ||||||||||||||||||||
| 58 | Policies => $options->{policies}, | ||||||||||||||||||||
| 59 | Pricing => $options->{pricing}, | ||||||||||||||||||||
| 60 | Support => $options->{support}, | ||||||||||||||||||||
| 61 | 1 | }; | |||||||||||||||||||
| 62 | |||||||||||||||||||||
| 63 | my $response = | ||||||||||||||||||||
| 64 | 1 | $self->{version}->handle_request('POST', $self->{uri}, 'update', { data => $data }); | |||||||||||||||||||
| 65 | 1 | return $self->_build_instance($response); | |||||||||||||||||||
| 66 | } | ||||||||||||||||||||
| 67 | |||||||||||||||||||||
| 68 | 2 | ▶ | sub _build_instance { | ||||||||||||||||||
|
Subroutine
_build_instance: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 69 | 2 | my ($self, $response) = @_; | |||||||||||||||||||
| 70 | return Twilio::Rest::Marketplace::V1::ModuleDataManagementInstance->new($self->{version}, | ||||||||||||||||||||
| 71 | 2 | $response->get_content, $self->{solution}{sid}); | |||||||||||||||||||
| 72 | } | ||||||||||||||||||||
| 73 | |||||||||||||||||||||
| 74 | package Twilio::Rest::Marketplace::V1::ModuleDataManagementInstance; | ||||||||||||||||||||
| 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 | 2 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.4
| |||||||||||||||||||||
| 81 | 2 | my ($class, $version, $payload, $sid) = @_; | |||||||||||||||||||
| 82 | 2 | my $self = $class->SUPER::new($version, $payload); | |||||||||||||||||||
| 83 | 2 | ▶ | $self->{solution} = { sid => $sid // $self->{properties}{sid} }; | ||||||||||||||||||
|
Condition33%1/3
$sid // $self->{"properties"}{"sid"}
MC/DC0%0/2
$sid // $self->{"properties"}{"sid"}
$sid
$self->{"properties"}{"sid"}
Truth table33%1/3
A // B
A= $sidB= $self->{"properties"}{"sid"}
| |||||||||||||||||||||
| 84 | 2 | return $self; | |||||||||||||||||||
| 85 | } | ||||||||||||||||||||
| 86 | |||||||||||||||||||||
| 87 | 0 | ▶ | sub fetch { | ||||||||||||||||||
|
Subroutine
fetch: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 88 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 89 | 0 | return $self->_context->fetch(@arguments); | |||||||||||||||||||
| 90 | } | ||||||||||||||||||||
| 91 | |||||||||||||||||||||
| 92 | 0 | ▶ | sub update { | ||||||||||||||||||
|
Subroutine
update: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 93 | 0 | my ($self, @arguments) = @_; | |||||||||||||||||||
| 94 | 0 | return $self->_context->update(@arguments); | |||||||||||||||||||
| 95 | } | ||||||||||||||||||||
| 96 | |||||||||||||||||||||
| 97 | 0 | ▶ | sub _context { | ||||||||||||||||||
|
Subroutine
_context: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 98 | 0 | my ($self) = @_; | |||||||||||||||||||
| 99 | return Twilio::Rest::Marketplace::V1::ModuleDataManagementContext->new($self->{version}, | ||||||||||||||||||||
| 100 | 0 | $self->{solution}{sid}); | |||||||||||||||||||
| 101 | } | ||||||||||||||||||||
| 102 | |||||||||||||||||||||
| 103 | 2 | ▶ | sub configuration { return $_[0]{properties}{configuration} } | ||||||||||||||||||
|
Subroutine
configuration: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 104 | 2 | ▶ | sub description { return $_[0]{properties}{description} } | ||||||||||||||||||
|
Subroutine
description: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 105 | 2 | ▶ | sub documentation { return $_[0]{properties}{documentation} } | ||||||||||||||||||
|
Subroutine
documentation: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 106 | 2 | ▶ | sub module_info { return $_[0]{properties}{module_info} } | ||||||||||||||||||
|
Subroutine
module_info: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 107 | 2 | ▶ | sub policies { return $_[0]{properties}{policies} } | ||||||||||||||||||
|
Subroutine
policies: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 108 | 2 | ▶ | sub pricing { return $_[0]{properties}{pricing} } | ||||||||||||||||||
|
Subroutine
pricing: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 109 | 2 | ▶ | sub sid { return $_[0]{properties}{sid} } | ||||||||||||||||||
|
Subroutine
sid: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 110 | 2 | ▶ | sub support { return $_[0]{properties}{support} } | ||||||||||||||||||
|
Subroutine
support: 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__ | ||||||||||||||||||||