« Twilio/Rest/Api/V2010/Account/Call/UserDefinedMessageSubscription.pm
↑ Summary
Twilio/Rest/Accounts/V1/Safelist.pm »
| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||
| 2 | package Twilio::Rest::Insights::V3::Query; | ||||||||||||
| 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::Insights::V3::QueryList; | ||||||||||||
| 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} = '/InsightsDomains/Conversations/Query'; | |||||||||||
| 20 | 2 | return $self; | |||||||||||
| 21 | } | ||||||||||||
| 22 | |||||||||||||
| 23 | 1 | ▶ | sub create { | ||||||||||
|
Subroutine
create: called CC=2 SCAR=7.0
| |||||||||||||
| 24 | 1 | my ($self, $body, $options) = @_; | |||||||||||
| 25 | 1 | ▶ | $options //= {}; | ||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||
| 26 | |||||||||||||
| 27 | 1 | my $data = Twilio::Serialize::json_body($body, {}); | |||||||||||
| 28 | |||||||||||||
| 29 | my $response = $self->{version}->handle_request( | ||||||||||||
| 30 | 'POST', | ||||||||||||
| 31 | $self->{uri}, | ||||||||||||
| 32 | 'create', | ||||||||||||
| 33 | { | ||||||||||||
| 34 | data => $data, | ||||||||||||
| 35 | params => { pageSize => $options->{page_size}, }, | ||||||||||||
| 36 | 1 | headers => { 'Content-Type' => 'application/json', } | |||||||||||
| 37 | } | ||||||||||||
| 38 | ); | ||||||||||||
| 39 | 1 | return Twilio::Rest::Insights::V3::QueryInstance->new($self->{version}, $response->get_content); | |||||||||||
| 40 | } | ||||||||||||
| 41 | |||||||||||||
| 42 | 1 | ▶ | sub fetch { | ||||||||||
|
Subroutine
fetch: called CC=2 SCAR=7.0
| |||||||||||||
| 43 | 1 | my ($self, $options) = @_; | |||||||||||
| 44 | 1 | ▶ | $options //= {}; | ||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||
| 45 | |||||||||||||
| 46 | my $response = $self->{version}->handle_request('GET', $self->{uri}, 'fetch', | ||||||||||||
| 47 | 1 | { params => { pageToken => $options->{page_token}, } }); | |||||||||||
| 48 | 1 | return Twilio::Rest::Insights::V3::QueryInstance->new($self->{version}, $response->get_content); | |||||||||||
| 49 | } | ||||||||||||
| 50 | |||||||||||||
| 51 | package Twilio::Rest::Insights::V3::QueryInstance; | ||||||||||||
| 52 | |||||||||||||
| 53 | 2 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 54 | |||||||||||||
| 55 | 2 | ▶ | use Twilio::Deserialize; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 56 | |||||||||||||
| 57 | 2 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||
| 58 | 2 | my ($class, $version, $payload) = @_; | |||||||||||
| 59 | 2 | my $self = $class->SUPER::new($version, $payload); | |||||||||||
| 60 | 2 | $self->{solution} = {}; | |||||||||||
| 61 | 2 | return $self; | |||||||||||
| 62 | } | ||||||||||||
| 63 | |||||||||||||
| 64 | 2 | ▶ | sub domain { return $_[0]{properties}{domain} } | ||||||||||
|
Subroutine
domain: called CC=1 SCAR=0.0
| |||||||||||||
| 65 | 2 | ▶ | sub items { return $_[0]{properties}{items} } | ||||||||||
|
Subroutine
items: called CC=1 SCAR=0.0
| |||||||||||||
| 66 | 2 | ▶ | sub meta { return $_[0]{properties}{meta} } | ||||||||||
|
Subroutine
meta: called CC=1 SCAR=0.0
| |||||||||||||
| 67 | |||||||||||||
| 68 | 2 | 1; | |||||||||||
| 69 | |||||||||||||
| 70 | __END__ | ||||||||||||