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   4959 use Moo::Role;
  8         28  
  8         59  
4              
5 8     8   2801 use namespace::autoclean;
  8         30  
  8         81  
6              
7             our $VERSION = '0.000027';
8              
9 8     8   852 use Types::Standard qw( InstanceOf Int );
  8         37  
  8         91  
10 8     8   6275 use Types::URI qw( Uri );
  8         29  
  8         68  
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             =encoding UTF-8
36              
37             =head1 NAME
38              
39             WebService::PayPal::PaymentsAdvanced::Error::Role::HasHTTPResponse - Role which provides attributes for an error in an HTTP response.
40              
41             =head1 VERSION
42              
43             version 0.000027
44              
45             =head1 METHODS
46              
47             The C<< $error->message() >>, and C<< $error->stack_trace() >> methods are
48             inherited from L<Throwable::Error>.
49              
50             =head2 http_response
51              
52             Returns the L<HTTP::Response> object which was returned when attempting to GET
53             the hosted form.
54              
55             =head2 http_status
56              
57             Returns the HTTP status code for the response.
58              
59             =head2 request_uri
60              
61             The URI of the request that caused the HTTP error.
62              
63             =head1 SUPPORT
64              
65             Bugs may be submitted through L<https://github.com/maxmind/webservice-paypal-paymentsadvanced/issues>.
66              
67             =head1 AUTHOR
68              
69             Olaf Alders <olaf@wundercounter.com>
70              
71             =head1 COPYRIGHT AND LICENSE
72              
73             This software is copyright (c) 2021 by MaxMind, Inc.
74              
75             This is free software; you can redistribute it and/or modify it under
76             the same terms as the Perl 5 programming language system itself.
77              
78             =cut
79              
80             __END__
81             #ABSTRACT: Role which provides attributes for an error in an HTTP response.
82