| 1 | # Generated by tools/generate.pl from Twilio's OpenAPI specs. Do not edit this file. | ||||||||||||
| 2 | package Twilio::Rest::Numbers::V1::SigningRequestConfiguration; | ||||||||||||
| 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::Numbers::V1::SigningRequestConfigurationList; | ||||||||||||
| 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} = '/SigningRequest/Configuration'; | |||||||||||
| 20 | 2 | return $self; | |||||||||||
| 21 | } | ||||||||||||
| 22 | |||||||||||||
| 23 | 1 | ▶ | sub create { | ||||||||||
|
Subroutine
create: called CC=1 SCAR=0.0
| |||||||||||||
| 24 | 1 | my ($self, $body) = @_; | |||||||||||
| 25 | |||||||||||||
| 26 | 1 | my $data = Twilio::Serialize::json_body($body, {}); | |||||||||||
| 27 | |||||||||||||
| 28 | my $response = $self->{version}->handle_request( | ||||||||||||
| 29 | 'POST', | ||||||||||||
| 30 | $self->{uri}, | ||||||||||||
| 31 | 1 | 'create', | |||||||||||
| 32 | { | ||||||||||||
| 33 | data => $data, | ||||||||||||
| 34 | headers => { 'Content-Type' => 'application/json', } | ||||||||||||
| 35 | } | ||||||||||||
| 36 | ); | ||||||||||||
| 37 | return Twilio::Rest::Numbers::V1::SigningRequestConfigurationInstance->new($self->{version}, | ||||||||||||
| 38 | 1 | $response->get_content); | |||||||||||
| 39 | } | ||||||||||||
| 40 | |||||||||||||
| 41 | 0 | ▶ | sub read { | ||||||||||
|
Subroutine
read: not called CC=1 SCAR=6.9
| |||||||||||||
| 42 | 0 | my ($self, @arguments) = @_; | |||||||||||
| 43 | 0 | return $self->read_records(@arguments); | |||||||||||
| 44 | } | ||||||||||||
| 45 | |||||||||||||
| 46 | 0 | ▶ | sub stream { | ||||||||||
|
Subroutine
stream: not called CC=1 SCAR=6.9
| |||||||||||||
| 47 | 0 | my ($self, @arguments) = @_; | |||||||||||
| 48 | 0 | return $self->stream_records(@arguments); | |||||||||||
| 49 | } | ||||||||||||
| 50 | |||||||||||||
| 51 | 1 | ▶ | sub page { | ||||||||||
|
Subroutine
page: called CC=2 SCAR=7.0
| |||||||||||||
| 52 | 1 | my ($self, $options, $page_size, $page_token, $page_number) = @_; | |||||||||||
| 53 | 1 | ▶ | $options //= {}; | ||||||||||
|
Condition50%1/2
$options //= {}
MC/DC0%0/1
$options //= {}
$options
Truth table50%1/2
A
A= $options
| |||||||||||||
| 54 | |||||||||||||
| 55 | my $params = { | ||||||||||||
| 56 | Country => $options->{country}, | ||||||||||||
| 57 | Product => $options->{product}, | ||||||||||||
| 58 | 1 | PageToken => $page_token, | |||||||||||
| 59 | Page => $page_number, | ||||||||||||
| 60 | PageSize => $page_size, | ||||||||||||
| 61 | }; | ||||||||||||
| 62 | |||||||||||||
| 63 | 1 | my $response = $self->{version}->page('GET', $self->{uri}, { params => $params }); | |||||||||||
| 64 | 1 | return $self->_build_page($response); | |||||||||||
| 65 | } | ||||||||||||
| 66 | |||||||||||||
| 67 | 0 | ▶ | sub get_page { | ||||||||||
|
Subroutine
get_page: not called CC=1 SCAR=6.9
| |||||||||||||
| 68 | 0 | my ($self, $target_url) = @_; | |||||||||||
| 69 | 0 | my $client = $self->{version}->get_domain->get_client; | |||||||||||
| 70 | 0 | return $self->_build_page($client->request('GET', $target_url)); | |||||||||||
| 71 | } | ||||||||||||
| 72 | |||||||||||||
| 73 | 1 | ▶ | sub _build_page { | ||||||||||
|
Subroutine
_build_page: called CC=1 SCAR=0.0
| |||||||||||||
| 74 | 1 | my ($self, $response) = @_; | |||||||||||
| 75 | return Twilio::Rest::Numbers::V1::SigningRequestConfigurationPage->new($self->{version}, | ||||||||||||
| 76 | 1 | $response, $self->{solution}); | |||||||||||
| 77 | } | ||||||||||||
| 78 | |||||||||||||
| 79 | package Twilio::Rest::Numbers::V1::SigningRequestConfigurationPage; | ||||||||||||
| 80 | |||||||||||||
| 81 | 2 | ▶ | use parent 'Twilio::Page'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 82 | |||||||||||||
| 83 | 1 | ▶ | sub records_key { return 'configurations' } | ||||||||||
|
Subroutine
records_key: called CC=1 SCAR=0.0
| |||||||||||||
| 84 | |||||||||||||
| 85 | 1 | ▶ | sub build_instance { | ||||||||||
|
Subroutine
build_instance: called CC=1 SCAR=0.0
| |||||||||||||
| 86 | 1 | my ($self, $payload) = @_; | |||||||||||
| 87 | return Twilio::Rest::Numbers::V1::SigningRequestConfigurationInstance->new($self->{version}, | ||||||||||||
| 88 | 1 | $payload); | |||||||||||
| 89 | } | ||||||||||||
| 90 | |||||||||||||
| 91 | package Twilio::Rest::Numbers::V1::SigningRequestConfigurationInstance; | ||||||||||||
| 92 | |||||||||||||
| 93 | 2 | ▶ | use parent 'Twilio::InstanceResource'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 94 | |||||||||||||
| 95 | 2 | ▶ | use Twilio::Deserialize; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 96 | |||||||||||||
| 97 | 2 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
| |||||||||||||
| 98 | 2 | my ($class, $version, $payload) = @_; | |||||||||||
| 99 | 2 | my $self = $class->SUPER::new($version, $payload); | |||||||||||
| 100 | 2 | $self->{solution} = {}; | |||||||||||
| 101 | 2 | return $self; | |||||||||||
| 102 | } | ||||||||||||
| 103 | |||||||||||||
| 104 | 2 | ▶ | sub country { return $_[0]{properties}{country} } | ||||||||||
|
Subroutine
country: called CC=1 SCAR=0.0
| |||||||||||||
| 105 | 2 | ▶ | sub email_message { return $_[0]{properties}{email_message} } | ||||||||||
|
Subroutine
email_message: called CC=1 SCAR=0.0
| |||||||||||||
| 106 | 2 | ▶ | sub email_subject { return $_[0]{properties}{email_subject} } | ||||||||||
|
Subroutine
email_subject: 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 logo_sid { return $_[0]{properties}{logo_sid} } | ||||||||||
|
Subroutine
logo_sid: called CC=1 SCAR=0.0
| |||||||||||||
| 109 | 2 | ▶ | sub product { return $_[0]{properties}{product} } | ||||||||||
|
Subroutine
product: called CC=1 SCAR=0.0
| |||||||||||||
| 110 | 2 | ▶ | sub url { return $_[0]{properties}{url} } | ||||||||||
|
Subroutine
url: called CC=1 SCAR=0.0
| |||||||||||||
| 111 | 2 | ▶ | sub url_redirection { return $_[0]{properties}{url_redirection} } | ||||||||||
|
Subroutine
url_redirection: called CC=1 SCAR=0.0
| |||||||||||||
| 112 | |||||||||||||
| 113 | 2 | 1; | |||||||||||
| 114 | |||||||||||||
| 115 | __END__ | ||||||||||||