« Twilio/Rest/Client.pm
↑ Summary
Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersCumulativeStatistics.pm »
| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||
| 2 | package Twilio::Rest::Numbers::V2::BundleClone; | ||||||||||||
| 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::Numbers::V2::BundleCloneContext; | ||||||||||||
| 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, $bundle_sid) = @_; | |||||||||||
| 17 | 1 | my $self = $class->SUPER::new($version); | |||||||||||
| 18 | 1 | $self->{solution} = { bundle_sid => $bundle_sid }; | |||||||||||
| 19 | 1 | $self->{uri} = join q{}, '/RegulatoryCompliance/Bundles/', | |||||||||||
| 20 | Twilio::Serialize::path_segment($bundle_sid), '/Clones'; | ||||||||||||
| 21 | 1 | return $self; | |||||||||||
| 22 | } | ||||||||||||
| 23 | |||||||||||||
| 24 | 1 | ▶ | sub create { | ||||||||||
|
Subroutine
create: called CC=2 SCAR=7.0
| |||||||||||||
| 25 | 1 | my ($self, $target_account_sid, $options) = @_; | |||||||||||
| 26 | 1 | ▶ | $options //= {}; | ||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||
| 27 | |||||||||||||
| 28 | my $data = { | ||||||||||||
| 29 | TargetAccountSid => $target_account_sid, | ||||||||||||
| 30 | FriendlyName => $options->{friendly_name}, | ||||||||||||
| 31 | 1 | MoveToDraft => Twilio::Serialize::boolean_to_string($options->{move_to_draft}), | |||||||||||
| 32 | }; | ||||||||||||
| 33 | |||||||||||||
| 34 | my $response = | ||||||||||||
| 35 | 1 | $self->{version}->handle_request('POST', $self->{uri}, 'create', { data => $data }); | |||||||||||
| 36 | 1 | return $self->_build_instance($response); | |||||||||||
| 37 | } | ||||||||||||
| 38 | |||||||||||||
| 39 | 1 | ▶ | sub _build_instance { | ||||||||||
|
Subroutine
_build_instance: called CC=1 SCAR=0.0
| |||||||||||||
| 40 | 1 | my ($self, $response) = @_; | |||||||||||
| 41 | return Twilio::Rest::Numbers::V2::BundleCloneInstance->new($self->{version}, | ||||||||||||
| 42 | 1 | $response->get_content, $self->{solution}{bundle_sid}); | |||||||||||
| 43 | } | ||||||||||||
| 44 | |||||||||||||
| 45 | package Twilio::Rest::Numbers::V2::BundleCloneInstance; | ||||||||||||
| 46 | |||||||||||||
| 47 | 2 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 48 | |||||||||||||
| 49 | 2 | ▶ | use Twilio::Deserialize; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 50 | |||||||||||||
| 51 | 1 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||
| 52 | 1 | my ($class, $version, $payload, $bundle_sid) = @_; | |||||||||||
| 53 | 1 | my $self = $class->SUPER::new($version, $payload); | |||||||||||
| 54 | 1 | $self->{solution} = { bundle_sid => $bundle_sid }; | |||||||||||
| 55 | 1 | return $self; | |||||||||||
| 56 | } | ||||||||||||
| 57 | |||||||||||||
| 58 | 0 | ▶ | sub create { | ||||||||||
|
Subroutine
create: not called CC=1 SCAR=6.9
| |||||||||||||
| 59 | 0 | my ($self, @arguments) = @_; | |||||||||||
| 60 | 0 | return $self->_context->create(@arguments); | |||||||||||
| 61 | } | ||||||||||||
| 62 | |||||||||||||
| 63 | 0 | ▶ | sub _context { | ||||||||||
|
Subroutine
_context: not called CC=1 SCAR=6.9
| |||||||||||||
| 64 | 0 | my ($self) = @_; | |||||||||||
| 65 | return Twilio::Rest::Numbers::V2::BundleCloneContext->new($self->{version}, | ||||||||||||
| 66 | 0 | $self->{solution}{bundle_sid}); | |||||||||||
| 67 | } | ||||||||||||
| 68 | |||||||||||||
| 69 | 1 | ▶ | sub account_sid { return $_[0]{properties}{account_sid} } | ||||||||||
|
Subroutine
account_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 70 | 1 | ▶ | sub bundle_sid { return $_[0]{properties}{bundle_sid} } | ||||||||||
|
Subroutine
bundle_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 71 | 1 | ▶ | sub date_created { return Twilio::Deserialize::date_time($_[0]{properties}{date_created}) } | ||||||||||
|
Subroutine
date_created: called CC=1 SCAR=0.0
| |||||||||||||
| 72 | 1 | ▶ | sub date_updated { return Twilio::Deserialize::date_time($_[0]{properties}{date_updated}) } | ||||||||||
|
Subroutine
date_updated: called CC=1 SCAR=0.0
| |||||||||||||
| 73 | 1 | ▶ | sub email { return $_[0]{properties}{email} } | ||||||||||
|
Subroutine
email: called CC=1 SCAR=0.0
| |||||||||||||
| 74 | 1 | ▶ | sub friendly_name { return $_[0]{properties}{friendly_name} } | ||||||||||
|
Subroutine
friendly_name: called CC=1 SCAR=0.0
| |||||||||||||
| 75 | 1 | ▶ | sub regulation_sid { return $_[0]{properties}{regulation_sid} } | ||||||||||
|
Subroutine
regulation_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 76 | 1 | ▶ | sub status { return $_[0]{properties}{status} } | ||||||||||
|
Subroutine
status: called CC=1 SCAR=0.0
| |||||||||||||
| 77 | 1 | ▶ | sub status_callback { return $_[0]{properties}{status_callback} } | ||||||||||
|
Subroutine
status_callback: called CC=1 SCAR=0.0
| |||||||||||||
| 78 | 1 | ▶ | sub url { return $_[0]{properties}{url} } | ||||||||||
|
Subroutine
url: called CC=1 SCAR=0.0
| |||||||||||||
| 79 | 1 | ▶ | sub valid_until { return Twilio::Deserialize::date_time($_[0]{properties}{valid_until}) } | ||||||||||
|
Subroutine
valid_until: called CC=1 SCAR=0.0
| |||||||||||||
| 80 | |||||||||||||
| 81 | 2 | 1; | |||||||||||
| 82 | |||||||||||||
| 83 | __END__ | ||||||||||||