« Twilio/Rest/FlexApi/V1/Configuration.pm
↑ Summary
Twilio/Rest/Conversations/V1/Service/ConversationWithParticipants.pm »
| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||
| 2 | package Twilio::Rest::Conversations::V1::ConversationWithParticipants; | ||||||||||||
| 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::ConversationWithParticipantsList; | ||||||||||||
| 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} = '/ConversationWithParticipants'; | |||||||||||
| 20 | 2 | return $self; | |||||||||||
| 21 | } | ||||||||||||
| 22 | |||||||||||||
| 23 | 2 | ▶ | sub create { | ||||||||||
|
Subroutine
create: called CC=2 SCAR=7.0
| |||||||||||||
| 24 | 2 | my ($self, $options) = @_; | |||||||||||
| 25 | 2 | ▶ | $options //= {}; | ||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||
| 26 | |||||||||||||
| 27 | my $data = { | ||||||||||||
| 28 | Attributes => $options->{attributes}, | ||||||||||||
| 29 | 'Bindings.Email.Address' => $options->{bindings_email_address}, | ||||||||||||
| 30 | 'Bindings.Email.Name' => $options->{bindings_email_name}, | ||||||||||||
| 31 | DateCreated => Twilio::Serialize::iso8601_date_time($options->{date_created}), | ||||||||||||
| 32 | DateUpdated => Twilio::Serialize::iso8601_date_time($options->{date_updated}), | ||||||||||||
| 33 | FriendlyName => $options->{friendly_name}, | ||||||||||||
| 34 | MessagingServiceSid => $options->{messaging_service_sid}, | ||||||||||||
| 35 | Participant => $options->{participant}, | ||||||||||||
| 36 | State => $options->{state}, | ||||||||||||
| 37 | 'Timers.Closed' => $options->{timers_closed}, | ||||||||||||
| 38 | 'Timers.Inactive' => $options->{timers_inactive}, | ||||||||||||
| 39 | UniqueName => $options->{unique_name}, | ||||||||||||
| 40 | 2 | }; | |||||||||||
| 41 | |||||||||||||
| 42 | my $response = $self->{version}->handle_request( | ||||||||||||
| 43 | 'POST', | ||||||||||||
| 44 | $self->{uri}, | ||||||||||||
| 45 | 'create', | ||||||||||||
| 46 | { | ||||||||||||
| 47 | data => $data, | ||||||||||||
| 48 | headers => { 'X-Twilio-Webhook-Enabled' => $options->{x_twilio_webhook_enabled}, } | ||||||||||||
| 49 | } | ||||||||||||
| 50 | 2 | ); | |||||||||||
| 51 | return Twilio::Rest::Conversations::V1::ConversationWithParticipantsInstance->new( | ||||||||||||
| 52 | 2 | $self->{version}, $response->get_content); | |||||||||||
| 53 | } | ||||||||||||
| 54 | |||||||||||||
| 55 | package Twilio::Rest::Conversations::V1::ConversationWithParticipantsInstance; | ||||||||||||
| 56 | |||||||||||||
| 57 | 2 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 58 | |||||||||||||
| 59 | 2 | ▶ | use Twilio::Deserialize; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 60 | |||||||||||||
| 61 | 2 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||
| 62 | 2 | my ($class, $version, $payload) = @_; | |||||||||||
| 63 | 2 | my $self = $class->SUPER::new($version, $payload); | |||||||||||
| 64 | 2 | $self->{solution} = {}; | |||||||||||
| 65 | 2 | return $self; | |||||||||||
| 66 | } | ||||||||||||
| 67 | |||||||||||||
| 68 | 2 | ▶ | sub account_sid { return $_[0]{properties}{account_sid} } | ||||||||||
|
Subroutine
account_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 69 | 2 | ▶ | sub attributes { return $_[0]{properties}{attributes} } | ||||||||||
|
Subroutine
attributes: called CC=1 SCAR=0.0
| |||||||||||||
| 70 | 2 | ▶ | sub bindings { return $_[0]{properties}{bindings} } | ||||||||||
|
Subroutine
bindings: called CC=1 SCAR=0.0
| |||||||||||||
| 71 | 2 | ▶ | sub chat_service_sid { return $_[0]{properties}{chat_service_sid} } | ||||||||||
|
Subroutine
chat_service_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 72 | 2 | ▶ | sub date_created { return Twilio::Deserialize::date_time($_[0]{properties}{date_created}) } | ||||||||||
|
Subroutine
date_created: called CC=1 SCAR=0.0
| |||||||||||||
| 73 | 2 | ▶ | sub date_updated { return Twilio::Deserialize::date_time($_[0]{properties}{date_updated}) } | ||||||||||
|
Subroutine
date_updated: called CC=1 SCAR=0.0
| |||||||||||||
| 74 | 2 | ▶ | sub friendly_name { return $_[0]{properties}{friendly_name} } | ||||||||||
|
Subroutine
friendly_name: called CC=1 SCAR=0.0
| |||||||||||||
| 75 | 2 | ▶ | sub links { return $_[0]{properties}{links} } | ||||||||||
|
Subroutine
links: called CC=1 SCAR=0.0
| |||||||||||||
| 76 | 2 | ▶ | sub messaging_service_sid { return $_[0]{properties}{messaging_service_sid} } | ||||||||||
|
Subroutine
messaging_service_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 77 | 2 | ▶ | sub sid { return $_[0]{properties}{sid} } | ||||||||||
|
Subroutine
sid: called CC=1 SCAR=0.0
| |||||||||||||
| 78 | 2 | ▶ | sub state { return $_[0]{properties}{state} } | ||||||||||
|
Subroutine
state: called CC=1 SCAR=0.0
| |||||||||||||
| 79 | 2 | ▶ | sub timers { return $_[0]{properties}{timers} } | ||||||||||
|
Subroutine
timers: called CC=1 SCAR=0.0
| |||||||||||||
| 80 | 2 | ▶ | sub unique_name { return $_[0]{properties}{unique_name} } | ||||||||||
|
Subroutine
unique_name: called CC=1 SCAR=0.0
| |||||||||||||
| 81 | 2 | ▶ | sub url { return $_[0]{properties}{url} } | ||||||||||
|
Subroutine
url: called CC=1 SCAR=0.0
| |||||||||||||
| 82 | |||||||||||||
| 83 | 2 | 1; | |||||||||||
| 84 | |||||||||||||
| 85 | __END__ | ||||||||||||