PaymentsAdvanced/Error/Role/HasHTTPResponse.pm

filter: Statementstmt 100% 17 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 100% 21 / 21 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« PaymentsAdvanced/Error/IPVerification.pm ↑ Summary PaymentsAdvanced/Response/Authorization.pm »
1 package WebService::PayPal::PaymentsAdvanced::Error::Role::HasHTTPResponse;
2  
3 8 ▶use Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 8 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 8 our $VERSION = '0.000028';
8  
9 8 ▶use Types::Standard qw( InstanceOf Int );
Subroutine BEGIN: called CC=1 SCAR=0.0
10 8 ▶use Types::URI qw( Uri );
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 8 has http_status => (
13 is => 'ro',
14 isa => Int,
15 required => 1,
16 );
17  
18 8 has http_response => (
19 is => 'ro',
20 isa => InstanceOf ['HTTP::Response'],
21 required => 1,
22 );
23  
24 8 has request_uri => (
25 is => 'ro',
26 isa => Uri,
27 coerce => 1,
28 required => 1,
29 );
30  
31 8 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.000028
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) 2022 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__
« PaymentsAdvanced/Error/IPVerification.pm ↑ Summary PaymentsAdvanced/Response/Authorization.pm »