| 1 | package Twilio::Exceptions::RestExceptionV1; | ||||||||||||
| 2 | |||||||||||||
| 3 | 7 | ▶ | use 5.016; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | 7 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | |||||||||||||
| 6 | # twilio-php has these two as siblings. Here this one inherits, so that code catching a | ||||||||||||
| 7 | # RestException works with every API, and get_status_code answers on both. | ||||||||||||
| 8 | 7 | ▶ | use parent 'Twilio::Exceptions::RestException'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 9 | |||||||||||||
| 10 | 7 | our $VERSION = '2.001'; | |||||||||||
| 11 | |||||||||||||
| 12 | 9 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||
| 13 | 9 | my ($class, $code, $message, $http_status_code, $params, $user_error) = @_; | |||||||||||
| 14 | 9 | my $self = $class->SUPER::new($message, $code, $http_status_code); | |||||||||||
| 15 | 9 | ▶ | $self->{params} = $params // {}; | ||||||||||
|
Condition100%2/2
$params // {}
MC/DC100%1/1
$params // {}
$params
Truth table100%2/2
A
A= $params
| |||||||||||||
| 16 | 9 | ▶ | $self->{user_error} = $user_error ? 1 : 0; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 17 | 9 | return $self; | |||||||||||
| 18 | } | ||||||||||||
| 19 | |||||||||||||
| 20 | 3 | ▶ | sub get_http_status_code { return $_[0]{status_code} } | ||||||||||
|
Subroutine
get_http_status_code: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||
| 21 | 2 | ▶ | sub get_params { return $_[0]{params} } | ||||||||||
|
Subroutine
get_params: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||
| 22 | 3 | ▶ | sub get_user_error { return $_[0]{user_error} } | ||||||||||
|
Subroutine
get_user_error: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||
| 23 | |||||||||||||
| 24 | 7 | 1; | |||||||||||
| 25 | |||||||||||||
| 26 | __END__ | ||||||||||||