« Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/Local.pm
↑ Summary
Twilio/Rest/Trusthub/V1/ComplianceTollfreeInquiries.pm »
| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||
| 2 | package Twilio::Rest::Api::V2010::Account::Call::UserDefinedMessage; | ||||||||||||
| 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::Api::V2010::Account::Call::UserDefinedMessageList; | ||||||||||||
| 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 | 1 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||
| 16 | 1 | my ($class, $version, $account_sid, $call_sid) = @_; | |||||||||||
| 17 | 1 | my $self = $class->SUPER::new($version); | |||||||||||
| 18 | 1 | $self->{solution} = { account_sid => $account_sid, call_sid => $call_sid }; | |||||||||||
| 19 | 1 | $self->{uri} = join q{}, '/Accounts/', Twilio::Serialize::path_segment($account_sid), '/Calls/', | |||||||||||
| 20 | Twilio::Serialize::path_segment($call_sid), '/UserDefinedMessages.json'; | ||||||||||||
| 21 | 1 | return $self; | |||||||||||
| 22 | } | ||||||||||||
| 23 | |||||||||||||
| 24 | 1 | ▶ | sub create { | ||||||||||
|
Subroutine
create: called CC=2 SCAR=7.0
| |||||||||||||
| 25 | 1 | my ($self, $content, $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 | Content => $content, | ||||||||||||
| 30 | IdempotencyKey => $options->{idempotency_key}, | ||||||||||||
| 31 | 1 | }; | |||||||||||
| 32 | |||||||||||||
| 33 | my $response = | ||||||||||||
| 34 | 1 | $self->{version}->handle_request('POST', $self->{uri}, 'create', { data => $data }); | |||||||||||
| 35 | return Twilio::Rest::Api::V2010::Account::Call::UserDefinedMessageInstance->new( | ||||||||||||
| 36 | $self->{version}, $response->get_content, | ||||||||||||
| 37 | $self->{solution}{account_sid}, | ||||||||||||
| 38 | $self->{solution}{call_sid} | ||||||||||||
| 39 | 1 | ); | |||||||||||
| 40 | } | ||||||||||||
| 41 | |||||||||||||
| 42 | package Twilio::Rest::Api::V2010::Account::Call::UserDefinedMessageInstance; | ||||||||||||
| 43 | |||||||||||||
| 44 | 2 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 45 | |||||||||||||
| 46 | 2 | ▶ | use Twilio::Deserialize; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 47 | |||||||||||||
| 48 | 1 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||
| 49 | 1 | my ($class, $version, $payload, $account_sid, $call_sid) = @_; | |||||||||||
| 50 | 1 | my $self = $class->SUPER::new($version, $payload); | |||||||||||
| 51 | 1 | $self->{solution} = { account_sid => $account_sid, call_sid => $call_sid }; | |||||||||||
| 52 | 1 | return $self; | |||||||||||
| 53 | } | ||||||||||||
| 54 | |||||||||||||
| 55 | 1 | ▶ | sub account_sid { return $_[0]{properties}{account_sid} } | ||||||||||
|
Subroutine
account_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 56 | 1 | ▶ | sub call_sid { return $_[0]{properties}{call_sid} } | ||||||||||
|
Subroutine
call_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 57 | 1 | ▶ | sub date_created { return Twilio::Deserialize::date_time($_[0]{properties}{date_created}) } | ||||||||||
|
Subroutine
date_created: called CC=1 SCAR=0.0
| |||||||||||||
| 58 | 1 | ▶ | sub sid { return $_[0]{properties}{sid} } | ||||||||||
|
Subroutine
sid: called CC=1 SCAR=0.0
| |||||||||||||
| 59 | |||||||||||||
| 60 | 2 | 1; | |||||||||||
| 61 | |||||||||||||
| 62 | __END__ | ||||||||||||