| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||
| 2 | package Twilio::Rest::Messaging::V1::ExternalCampaign; | ||||||||||||
| 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::ExternalCampaignList; | ||||||||||||
| 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) = @_; | |||||||||||
| 17 | 1 | my $self = $class->SUPER::new($version); | |||||||||||
| 18 | 1 | $self->{solution} = {}; | |||||||||||
| 19 | 1 | $self->{uri} = '/Services/PreregisteredUsa2p'; | |||||||||||
| 20 | 1 | return $self; | |||||||||||
| 21 | } | ||||||||||||
| 22 | |||||||||||||
| 23 | 1 | ▶ | sub create { | ||||||||||
|
Subroutine
create: called CC=2 SCAR=7.0
| |||||||||||||
| 24 | 1 | my ($self, $campaign_id, $messaging_service_sid, $options) = @_; | |||||||||||
| 25 | 1 | ▶ | $options //= {}; | ||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||
| 26 | |||||||||||||
| 27 | my $data = { | ||||||||||||
| 28 | CampaignId => $campaign_id, | ||||||||||||
| 29 | MessagingServiceSid => $messaging_service_sid, | ||||||||||||
| 30 | 1 | CnpMigration => Twilio::Serialize::boolean_to_string($options->{cnp_migration}), | |||||||||||
| 31 | }; | ||||||||||||
| 32 | |||||||||||||
| 33 | my $response = | ||||||||||||
| 34 | 1 | $self->{version}->handle_request('POST', $self->{uri}, 'create', { data => $data }); | |||||||||||
| 35 | return Twilio::Rest::Messaging::V1::ExternalCampaignInstance->new($self->{version}, | ||||||||||||
| 36 | 1 | $response->get_content); | |||||||||||
| 37 | } | ||||||||||||
| 38 | |||||||||||||
| 39 | package Twilio::Rest::Messaging::V1::ExternalCampaignInstance; | ||||||||||||
| 40 | |||||||||||||
| 41 | 2 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 42 | |||||||||||||
| 43 | 2 | ▶ | use Twilio::Deserialize; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 44 | |||||||||||||
| 45 | 1 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||
| 46 | 1 | my ($class, $version, $payload) = @_; | |||||||||||
| 47 | 1 | my $self = $class->SUPER::new($version, $payload); | |||||||||||
| 48 | 1 | $self->{solution} = {}; | |||||||||||
| 49 | 1 | return $self; | |||||||||||
| 50 | } | ||||||||||||
| 51 | |||||||||||||
| 52 | 1 | ▶ | sub account_sid { return $_[0]{properties}{account_sid} } | ||||||||||
|
Subroutine
account_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 53 | 1 | ▶ | sub campaign_id { return $_[0]{properties}{campaign_id} } | ||||||||||
|
Subroutine
campaign_id: called CC=1 SCAR=0.0
| |||||||||||||
| 54 | 1 | ▶ | sub date_created { return Twilio::Deserialize::date_time($_[0]{properties}{date_created}) } | ||||||||||
|
Subroutine
date_created: called CC=1 SCAR=0.0
| |||||||||||||
| 55 | 1 | ▶ | sub messaging_service_sid { return $_[0]{properties}{messaging_service_sid} } | ||||||||||
|
Subroutine
messaging_service_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 56 | 1 | ▶ | sub sid { return $_[0]{properties}{sid} } | ||||||||||
|
Subroutine
sid: called CC=1 SCAR=0.0
| |||||||||||||
| 57 | |||||||||||||
| 58 | 2 | 1; | |||||||||||
| 59 | |||||||||||||
| 60 | __END__ | ||||||||||||