« Twilio/Rest/IpMessaging/V2/Service/Role.pm
↑ Summary
Twilio/Rest/Serverless/V1/Service/Function/FunctionVersion.pm »
| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||
| 2 | package Twilio::Rest::Conversations::V1::Service::Configuration; | ||||||||||||
| 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::Conversations::V1::Service::ConfigurationContext; | ||||||||||||
| 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 | 6 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||
| 16 | 6 | my ($class, $version, $chat_service_sid) = @_; | |||||||||||
| 17 | 6 | my $self = $class->SUPER::new($version); | |||||||||||
| 18 | 6 | $self->{solution} = { chat_service_sid => $chat_service_sid }; | |||||||||||
| 19 | 6 | $self->{uri} = join q{}, '/Services/', Twilio::Serialize::path_segment($chat_service_sid), | |||||||||||
| 20 | '/Configuration'; | ||||||||||||
| 21 | 6 | 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 update { | ||||||||||
|
Subroutine
update: called CC=2 SCAR=7.0
| |||||||||||||
| 32 | 1 | my ($self, $options) = @_; | |||||||||||
| 33 | 1 | ▶ | $options //= {}; | ||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||
| 34 | |||||||||||||
| 35 | my $data = { | ||||||||||||
| 36 | DefaultChatServiceRoleSid => $options->{default_chat_service_role_sid}, | ||||||||||||
| 37 | DefaultConversationCreatorRoleSid => $options->{default_conversation_creator_role_sid}, | ||||||||||||
| 38 | DefaultConversationRoleSid => $options->{default_conversation_role_sid}, | ||||||||||||
| 39 | 1 | ReachabilityEnabled => Twilio::Serialize::boolean_to_string($options->{reachability_enabled}), | |||||||||||
| 40 | }; | ||||||||||||
| 41 | |||||||||||||
| 42 | my $response = | ||||||||||||
| 43 | 1 | $self->{version}->handle_request('POST', $self->{uri}, 'update', { data => $data }); | |||||||||||
| 44 | 1 | return $self->_build_instance($response); | |||||||||||
| 45 | } | ||||||||||||
| 46 | |||||||||||||
| 47 | 2 | ▶ | sub _build_instance { | ||||||||||
|
Subroutine
_build_instance: called CC=1 SCAR=0.0
| |||||||||||||
| 48 | 2 | my ($self, $response) = @_; | |||||||||||
| 49 | return Twilio::Rest::Conversations::V1::Service::ConfigurationInstance->new($self->{version}, | ||||||||||||
| 50 | 2 | $response->get_content, $self->{solution}{chat_service_sid}); | |||||||||||
| 51 | } | ||||||||||||
| 52 | |||||||||||||
| 53 | 2 | ▶ | sub notifications { | ||||||||||
|
Subroutine
notifications: called CC=1 SCAR=0.0
| |||||||||||||
| 54 | 2 | my ($self) = @_; | |||||||||||
| 55 | 2 | require Twilio::Rest::Conversations::V1::Service::Configuration::Notification; | |||||||||||
| 56 | return Twilio::Rest::Conversations::V1::Service::Configuration::NotificationContext->new( | ||||||||||||
| 57 | 2 | $self->{version}, $self->{solution}{chat_service_sid}); | |||||||||||
| 58 | } | ||||||||||||
| 59 | |||||||||||||
| 60 | 2 | ▶ | sub webhooks { | ||||||||||
|
Subroutine
webhooks: called CC=1 SCAR=0.0
| |||||||||||||
| 61 | 2 | my ($self) = @_; | |||||||||||
| 62 | 2 | require Twilio::Rest::Conversations::V1::Service::Configuration::Webhook; | |||||||||||
| 63 | return Twilio::Rest::Conversations::V1::Service::Configuration::WebhookContext->new( | ||||||||||||
| 64 | 2 | $self->{version}, $self->{solution}{chat_service_sid}); | |||||||||||
| 65 | } | ||||||||||||
| 66 | |||||||||||||
| 67 | package Twilio::Rest::Conversations::V1::Service::ConfigurationInstance; | ||||||||||||
| 68 | |||||||||||||
| 69 | 2 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 70 | |||||||||||||
| 71 | 2 | ▶ | use Twilio::Deserialize; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 72 | |||||||||||||
| 73 | 2 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||
| 74 | 2 | my ($class, $version, $payload, $chat_service_sid) = @_; | |||||||||||
| 75 | 2 | my $self = $class->SUPER::new($version, $payload); | |||||||||||
| 76 | 2 | $self->{solution} = { chat_service_sid => $chat_service_sid }; | |||||||||||
| 77 | 2 | return $self; | |||||||||||
| 78 | } | ||||||||||||
| 79 | |||||||||||||
| 80 | 0 | ▶ | sub fetch { | ||||||||||
|
Subroutine
fetch: not called CC=1 SCAR=6.9
| |||||||||||||
| 81 | 0 | my ($self, @arguments) = @_; | |||||||||||
| 82 | 0 | return $self->_context->fetch(@arguments); | |||||||||||
| 83 | } | ||||||||||||
| 84 | |||||||||||||
| 85 | 0 | ▶ | sub update { | ||||||||||
|
Subroutine
update: not called CC=1 SCAR=6.9
| |||||||||||||
| 86 | 0 | my ($self, @arguments) = @_; | |||||||||||
| 87 | 0 | return $self->_context->update(@arguments); | |||||||||||
| 88 | } | ||||||||||||
| 89 | |||||||||||||
| 90 | 0 | ▶ | sub notifications { | ||||||||||
|
Subroutine
notifications: not called CC=1 SCAR=6.9
| |||||||||||||
| 91 | 0 | my ($self, @arguments) = @_; | |||||||||||
| 92 | 0 | return $self->_context->notifications(@arguments); | |||||||||||
| 93 | } | ||||||||||||
| 94 | |||||||||||||
| 95 | 0 | ▶ | sub webhooks { | ||||||||||
|
Subroutine
webhooks: not called CC=1 SCAR=6.9
| |||||||||||||
| 96 | 0 | my ($self, @arguments) = @_; | |||||||||||
| 97 | 0 | return $self->_context->webhooks(@arguments); | |||||||||||
| 98 | } | ||||||||||||
| 99 | |||||||||||||
| 100 | 0 | ▶ | sub _context { | ||||||||||
|
Subroutine
_context: not called CC=1 SCAR=6.9
| |||||||||||||
| 101 | 0 | my ($self) = @_; | |||||||||||
| 102 | return Twilio::Rest::Conversations::V1::Service::ConfigurationContext->new($self->{version}, | ||||||||||||
| 103 | 0 | $self->{solution}{chat_service_sid}); | |||||||||||
| 104 | } | ||||||||||||
| 105 | |||||||||||||
| 106 | 2 | ▶ | sub chat_service_sid { return $_[0]{properties}{chat_service_sid} } | ||||||||||
|
Subroutine
chat_service_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 107 | 2 | ▶ | sub default_chat_service_role_sid { return $_[0]{properties}{default_chat_service_role_sid} } | ||||||||||
|
Subroutine
default_chat_service_role_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 108 | |||||||||||||
| 109 | 2 | ▶ | sub default_conversation_creator_role_sid { | ||||||||||
|
Subroutine
default_conversation_creator_role_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 110 | 2 | return $_[0]{properties}{default_conversation_creator_role_sid}; | |||||||||||
| 111 | } | ||||||||||||
| 112 | 2 | ▶ | sub default_conversation_role_sid { return $_[0]{properties}{default_conversation_role_sid} } | ||||||||||
|
Subroutine
default_conversation_role_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 113 | 2 | ▶ | sub links { return $_[0]{properties}{links} } | ||||||||||
|
Subroutine
links: called CC=1 SCAR=0.0
| |||||||||||||
| 114 | 2 | ▶ | sub reachability_enabled { return $_[0]{properties}{reachability_enabled} } | ||||||||||
|
Subroutine
reachability_enabled: called CC=1 SCAR=0.0
| |||||||||||||
| 115 | 2 | ▶ | sub url { return $_[0]{properties}{url} } | ||||||||||
|
Subroutine
url: called CC=1 SCAR=0.0
| |||||||||||||
| 116 | |||||||||||||
| 117 | 2 | 1; | |||||||||||
| 118 | |||||||||||||
| 119 | __END__ | ||||||||||||