« Twilio/Rest/Conversations/V1/Service/Configuration/Webhook.pm
↑ Summary
Twilio/Rest/Pricing/V2/Number.pm »
| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||
| 2 | package Twilio::Rest::Bulkexports::V1::Export::ExportCustomJob; | ||||||||||||
| 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::Bulkexports::V1::Export::ExportCustomJobList; | ||||||||||||
| 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, $resource_type) = @_; | |||||||||||
| 17 | 2 | my $self = $class->SUPER::new($version); | |||||||||||
| 18 | 2 | $self->{solution} = { resource_type => $resource_type }; | |||||||||||
| 19 | 2 | $self->{uri} = join q{}, '/Exports/', Twilio::Serialize::path_segment($resource_type), '/Jobs'; | |||||||||||
| 20 | 2 | return $self; | |||||||||||
| 21 | } | ||||||||||||
| 22 | |||||||||||||
| 23 | 1 | ▶ | sub create { | ||||||||||
|
Subroutine
create: called CC=2 SCAR=7.0
| |||||||||||||
| 24 | 1 | my ($self, $start_day, $end_day, $friendly_name, $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 | StartDay => $start_day, | ||||||||||||
| 29 | EndDay => $end_day, | ||||||||||||
| 30 | FriendlyName => $friendly_name, | ||||||||||||
| 31 | Email => $options->{email}, | ||||||||||||
| 32 | WebhookMethod => $options->{webhook_method}, | ||||||||||||
| 33 | WebhookUrl => $options->{webhook_url}, | ||||||||||||
| 34 | 1 | }; | |||||||||||
| 35 | |||||||||||||
| 36 | my $response = | ||||||||||||
| 37 | 1 | $self->{version}->handle_request('POST', $self->{uri}, 'create', { data => $data }); | |||||||||||
| 38 | return Twilio::Rest::Bulkexports::V1::Export::ExportCustomJobInstance->new($self->{version}, | ||||||||||||
| 39 | 1 | $response->get_content, $self->{solution}{resource_type}); | |||||||||||
| 40 | } | ||||||||||||
| 41 | |||||||||||||
| 42 | 0 | ▶ | sub read { | ||||||||||
|
Subroutine
read: not called CC=1 SCAR=6.9
| |||||||||||||
| 43 | 0 | my ($self, @arguments) = @_; | |||||||||||
| 44 | 0 | return $self->read_records(@arguments); | |||||||||||
| 45 | } | ||||||||||||
| 46 | |||||||||||||
| 47 | 0 | ▶ | sub stream { | ||||||||||
|
Subroutine
stream: not called CC=1 SCAR=6.9
| |||||||||||||
| 48 | 0 | my ($self, @arguments) = @_; | |||||||||||
| 49 | 0 | return $self->stream_records(@arguments); | |||||||||||
| 50 | } | ||||||||||||
| 51 | |||||||||||||
| 52 | 1 | ▶ | sub page { | ||||||||||
|
Subroutine
page: called CC=2 SCAR=7.0
| |||||||||||||
| 53 | 1 | my ($self, $options, $page_size, $page_token, $page_number) = @_; | |||||||||||
| 54 | 1 | ▶ | $options //= {}; | ||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||
| 55 | |||||||||||||
| 56 | 1 | my $params = { | |||||||||||
| 57 | PageToken => $page_token, | ||||||||||||
| 58 | Page => $page_number, | ||||||||||||
| 59 | PageSize => $page_size, | ||||||||||||
| 60 | }; | ||||||||||||
| 61 | |||||||||||||
| 62 | 1 | my $response = $self->{version}->page('GET', $self->{uri}, { params => $params }); | |||||||||||
| 63 | 1 | return $self->_build_page($response); | |||||||||||
| 64 | } | ||||||||||||
| 65 | |||||||||||||
| 66 | 0 | ▶ | sub get_page { | ||||||||||
|
Subroutine
get_page: not called CC=1 SCAR=6.9
| |||||||||||||
| 67 | 0 | my ($self, $target_url) = @_; | |||||||||||
| 68 | 0 | my $client = $self->{version}->get_domain->get_client; | |||||||||||
| 69 | 0 | return $self->_build_page($client->request('GET', $target_url)); | |||||||||||
| 70 | } | ||||||||||||
| 71 | |||||||||||||
| 72 | 1 | ▶ | sub _build_page { | ||||||||||
|
Subroutine
_build_page: called CC=1 SCAR=0.0
| |||||||||||||
| 73 | 1 | my ($self, $response) = @_; | |||||||||||
| 74 | return Twilio::Rest::Bulkexports::V1::Export::ExportCustomJobPage->new($self->{version}, | ||||||||||||
| 75 | 1 | $response, $self->{solution}); | |||||||||||
| 76 | } | ||||||||||||
| 77 | |||||||||||||
| 78 | package Twilio::Rest::Bulkexports::V1::Export::ExportCustomJobPage; | ||||||||||||
| 79 | |||||||||||||
| 80 | 2 | ▶ | use parent 'Twilio::Page'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 81 | |||||||||||||
| 82 | 1 | ▶ | sub records_key { return 'jobs' } | ||||||||||
|
Subroutine
records_key: called CC=1 SCAR=0.0
| |||||||||||||
| 83 | |||||||||||||
| 84 | 1 | ▶ | sub build_instance { | ||||||||||
|
Subroutine
build_instance: called CC=1 SCAR=0.0
| |||||||||||||
| 85 | 1 | my ($self, $payload) = @_; | |||||||||||
| 86 | return Twilio::Rest::Bulkexports::V1::Export::ExportCustomJobInstance->new($self->{version}, | ||||||||||||
| 87 | 1 | $payload, $self->{solution}{resource_type}); | |||||||||||
| 88 | } | ||||||||||||
| 89 | |||||||||||||
| 90 | package Twilio::Rest::Bulkexports::V1::Export::ExportCustomJobInstance; | ||||||||||||
| 91 | |||||||||||||
| 92 | 2 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 93 | |||||||||||||
| 94 | 2 | ▶ | use Twilio::Deserialize; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 95 | |||||||||||||
| 96 | 2 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||
| 97 | 2 | my ($class, $version, $payload, $resource_type) = @_; | |||||||||||
| 98 | 2 | my $self = $class->SUPER::new($version, $payload); | |||||||||||
| 99 | 2 | $self->{solution} = { resource_type => $resource_type }; | |||||||||||
| 100 | 2 | return $self; | |||||||||||
| 101 | } | ||||||||||||
| 102 | |||||||||||||
| 103 | 2 | ▶ | sub details { return $_[0]{properties}{details} } | ||||||||||
|
Subroutine
details: called CC=1 SCAR=0.0
| |||||||||||||
| 104 | 2 | ▶ | sub email { return $_[0]{properties}{email} } | ||||||||||
|
Subroutine
email: called CC=1 SCAR=0.0
| |||||||||||||
| 105 | 2 | ▶ | sub end_day { return $_[0]{properties}{end_day} } | ||||||||||
|
Subroutine
end_day: called CC=1 SCAR=0.0
| |||||||||||||
| 106 | 2 | ▶ | sub estimated_completion_time { return $_[0]{properties}{estimated_completion_time} } | ||||||||||
|
Subroutine
estimated_completion_time: called CC=1 SCAR=0.0
| |||||||||||||
| 107 | 2 | ▶ | sub friendly_name { return $_[0]{properties}{friendly_name} } | ||||||||||
|
Subroutine
friendly_name: called CC=1 SCAR=0.0
| |||||||||||||
| 108 | 2 | ▶ | sub job_queue_position { return $_[0]{properties}{job_queue_position} } | ||||||||||
|
Subroutine
job_queue_position: called CC=1 SCAR=0.0
| |||||||||||||
| 109 | 2 | ▶ | sub job_sid { return $_[0]{properties}{job_sid} } | ||||||||||
|
Subroutine
job_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 110 | 2 | ▶ | sub resource_type { return $_[0]{properties}{resource_type} } | ||||||||||
|
Subroutine
resource_type: called CC=1 SCAR=0.0
| |||||||||||||
| 111 | 2 | ▶ | sub start_day { return $_[0]{properties}{start_day} } | ||||||||||
|
Subroutine
start_day: called CC=1 SCAR=0.0
| |||||||||||||
| 112 | 2 | ▶ | sub webhook_method { return $_[0]{properties}{webhook_method} } | ||||||||||
|
Subroutine
webhook_method: called CC=1 SCAR=0.0
| |||||||||||||
| 113 | 2 | ▶ | sub webhook_url { return $_[0]{properties}{webhook_url} } | ||||||||||
|
Subroutine
webhook_url: called CC=1 SCAR=0.0
| |||||||||||||
| 114 | |||||||||||||
| 115 | 2 | 1; | |||||||||||
| 116 | |||||||||||||
| 117 | __END__ | ||||||||||||