File Coverage

blib/lib/WebService/PayPal/PaymentsAdvanced/Error/Role/HasHTTPResponse.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 16 16 100.0


line stmt bran cond sub pod time code
1             package WebService::PayPal::PaymentsAdvanced::Error::Role::HasHTTPResponse;
2              
3 8     8   4576 use Moo::Role;
  8         33  
  8         53  
4              
5 8     8   2758 use namespace::autoclean;
  8         19  
  8         70  
6              
7             our $VERSION = '0.000026';
8              
9 8     8   862 use Types::Standard qw( InstanceOf Int );
  8         24  
  8         81  
10 8     8   5910 use Types::URI qw( Uri );
  8         31  
  8         70  
11              
12             has http_status => (
13             is => 'ro',
14             isa => Int,
15             required => 1,
16             );
17              
18             has http_response => (
19             is => 'ro',
20             isa => InstanceOf ['HTTP::Response'],
21             required => 1,
22             );
23              
24             has request_uri => (
25             is => 'ro',
26             isa => Uri,
27             coerce => 1,
28             required => 1,
29             );
30              
31             1;
32              
33             =pod
34              
35             =head1 NAME
36              
37             WebService::PayPal::PaymentsAdvanced::Error::Role::HasHTTPResponse - Role which provides attributes for an error in an HTTP response.
38              
39             =head1 VERSION
40              
41             version 0.000026
42              
43             =head1 METHODS
44              
45             The C<< $error->message() >>, and C<< $error->stack_trace() >> methods are
46             inherited from L<Throwable::Error>.
47              
48             =head2 http_response
49              
50             Returns the L<HTTP::Response> object which was returned when attempting to GET
51             the hosted form.
52              
53             =head2 http_status
54              
55             Returns the HTTP status code for the response.
56              
57             =head2 request_uri
58              
59             The URI of the request that caused the HTTP error.
60              
61             =head1 AUTHOR
62              
63             Olaf Alders <olaf@wundercounter.com>
64              
65             =head1 COPYRIGHT AND LICENSE
66              
67             This software is copyright (c) 2020 by MaxMind, Inc.
68              
69             This is free software; you can redistribute it and/or modify it under
70             the same terms as the Perl 5 programming language system itself.
71              
72             =cut
73              
74             __END__
75             #ABSTRACT: Role which provides attributes for an error in an HTTP response.
76