« Twilio/Rest/Insights/V1/Conference/ConferenceParticipant.pm
↑ Summary
Twilio/Rest/FlexApi/V2/FlexUser.pm »
| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||
| 2 | package Twilio::Rest::Messaging::V1::DomainConfig; | ||||||||||||
| 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::DomainConfigContext; | ||||||||||||
| 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 | 3 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||
| 16 | 3 | my ($class, $version, $domain_sid) = @_; | |||||||||||
| 17 | 3 | my $self = $class->SUPER::new($version); | |||||||||||
| 18 | 3 | $self->{solution} = { domain_sid => $domain_sid }; | |||||||||||
| 19 | 3 | $self->{uri} = join q{}, '/LinkShortening/Domains/', | |||||||||||
| 20 | Twilio::Serialize::path_segment($domain_sid), '/Config'; | ||||||||||||
| 21 | 3 | 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 | 2 | ▶ | sub update { | ||||||||||
|
Subroutine
update: called CC=2 SCAR=7.0
| |||||||||||||
| 32 | 2 | my ($self, $options) = @_; | |||||||||||
| 33 | 2 | ▶ | $options //= {}; | ||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||
| 34 | |||||||||||||
| 35 | my $data = { | ||||||||||||
| 36 | CallbackUrl => $options->{callback_url}, | ||||||||||||
| 37 | ContinueOnFailure => Twilio::Serialize::boolean_to_string($options->{continue_on_failure}), | ||||||||||||
| 38 | DisableHttps => Twilio::Serialize::boolean_to_string($options->{disable_https}), | ||||||||||||
| 39 | FallbackUrl => $options->{fallback_url}, | ||||||||||||
| 40 | 2 | }; | |||||||||||
| 41 | |||||||||||||
| 42 | my $response = | ||||||||||||
| 43 | 2 | $self->{version}->handle_request('POST', $self->{uri}, 'update', { data => $data }); | |||||||||||
| 44 | 2 | return $self->_build_instance($response); | |||||||||||
| 45 | } | ||||||||||||
| 46 | |||||||||||||
| 47 | 3 | ▶ | sub _build_instance { | ||||||||||
|
Subroutine
_build_instance: called CC=1 SCAR=0.0
| |||||||||||||
| 48 | 3 | my ($self, $response) = @_; | |||||||||||
| 49 | return Twilio::Rest::Messaging::V1::DomainConfigInstance->new($self->{version}, | ||||||||||||
| 50 | 3 | $response->get_content, $self->{solution}{domain_sid}); | |||||||||||
| 51 | } | ||||||||||||
| 52 | |||||||||||||
| 53 | package Twilio::Rest::Messaging::V1::DomainConfigInstance; | ||||||||||||
| 54 | |||||||||||||
| 55 | 2 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 56 | |||||||||||||
| 57 | 2 | ▶ | use Twilio::Deserialize; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 58 | |||||||||||||
| 59 | 3 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||
| 60 | 3 | my ($class, $version, $payload, $domain_sid) = @_; | |||||||||||
| 61 | 3 | my $self = $class->SUPER::new($version, $payload); | |||||||||||
| 62 | 3 | $self->{solution} = { domain_sid => $domain_sid }; | |||||||||||
| 63 | 3 | return $self; | |||||||||||
| 64 | } | ||||||||||||
| 65 | |||||||||||||
| 66 | 0 | ▶ | sub fetch { | ||||||||||
|
Subroutine
fetch: not called CC=1 SCAR=6.9
| |||||||||||||
| 67 | 0 | my ($self, @arguments) = @_; | |||||||||||
| 68 | 0 | return $self->_context->fetch(@arguments); | |||||||||||
| 69 | } | ||||||||||||
| 70 | |||||||||||||
| 71 | 0 | ▶ | sub update { | ||||||||||
|
Subroutine
update: not called CC=1 SCAR=6.9
| |||||||||||||
| 72 | 0 | my ($self, @arguments) = @_; | |||||||||||
| 73 | 0 | return $self->_context->update(@arguments); | |||||||||||
| 74 | } | ||||||||||||
| 75 | |||||||||||||
| 76 | 0 | ▶ | sub _context { | ||||||||||
|
Subroutine
_context: not called CC=1 SCAR=6.9
| |||||||||||||
| 77 | 0 | my ($self) = @_; | |||||||||||
| 78 | return Twilio::Rest::Messaging::V1::DomainConfigContext->new($self->{version}, | ||||||||||||
| 79 | 0 | $self->{solution}{domain_sid}); | |||||||||||
| 80 | } | ||||||||||||
| 81 | |||||||||||||
| 82 | 3 | ▶ | sub callback_url { return $_[0]{properties}{callback_url} } | ||||||||||
|
Subroutine
callback_url: called CC=1 SCAR=0.0
| |||||||||||||
| 83 | 3 | ▶ | sub config_sid { return $_[0]{properties}{config_sid} } | ||||||||||
|
Subroutine
config_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 84 | 3 | ▶ | sub continue_on_failure { return $_[0]{properties}{continue_on_failure} } | ||||||||||
|
Subroutine
continue_on_failure: called CC=1 SCAR=0.0
| |||||||||||||
| 85 | 3 | ▶ | sub date_created { return Twilio::Deserialize::date_time($_[0]{properties}{date_created}) } | ||||||||||
|
Subroutine
date_created: called CC=1 SCAR=0.0
| |||||||||||||
| 86 | 3 | ▶ | sub date_updated { return Twilio::Deserialize::date_time($_[0]{properties}{date_updated}) } | ||||||||||
|
Subroutine
date_updated: called CC=1 SCAR=0.0
| |||||||||||||
| 87 | 3 | ▶ | sub disable_https { return $_[0]{properties}{disable_https} } | ||||||||||
|
Subroutine
disable_https: called CC=1 SCAR=0.0
| |||||||||||||
| 88 | 3 | ▶ | sub domain_sid { return $_[0]{properties}{domain_sid} } | ||||||||||
|
Subroutine
domain_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 89 | 3 | ▶ | sub fallback_url { return $_[0]{properties}{fallback_url} } | ||||||||||
|
Subroutine
fallback_url: called CC=1 SCAR=0.0
| |||||||||||||
| 90 | 3 | ▶ | sub url { return $_[0]{properties}{url} } | ||||||||||
|
Subroutine
url: called CC=1 SCAR=0.0
| |||||||||||||
| 91 | |||||||||||||
| 92 | 2 | 1; | |||||||||||
| 93 | |||||||||||||
| 94 | __END__ | ||||||||||||