lib/Google/Ads/Common/AuthError.pm

filter: Statementstmt 100% 23 / 23 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 100% 29 / 29 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« lib/Google/Ads/AdWords/v201809/TrialService/TrialServiceInterfacePort.pm ↑ Summary lib/Google/Ads/Common/ReportDownloadError.pm »
1 # Copyright 2011, Google Inc. All Rights Reserved.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14  
15 package Google::Ads::Common::AuthError;
16  
17 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 2 ▶use version;
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21 # The following needs to be on one line because CPAN uses a particularly hacky
22 # eval() to determine module versions.
23 2 ▶use Google::Ads::Common::Constants; our $VERSION = ${Google::Ads::Common::Constants::VERSION};
Subroutine BEGIN: called CC=1 SCAR=0.0
24  
25 2 ▶use Class::Std::Fast;
Subroutine BEGIN: called CC=1 SCAR=0.0
26  
27 # Class::Std-style attributes. Need to be kept in the same line.
28 1 my %message_of : ATTR(:name<message>);
29 2 my %code_of : ATTR(:name<code>);
30 2 my %content_of : ATTR(:name<content>);
31  
32 sub as_string : STRINGIFY {
33 my $self = shift;
34 return
35 sprintf("AuthError {\n message: %s\n code: %s\n" . " content: %s\n}",
36 $self->get_message(), $self->get_code(), $self->get_content());
37 2 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
38  
39 2 1;
40  
41 =pod
42  
43 =head1 NAME
44  
45 Google::Ads::Common::AuthError
46  
47 =head1 DESCRIPTION
48  
49 Captures authorization error information.
50  
51 =head1 ATTRIBUTES
52  
53 Each of these attributes can be set via
54 Google::Ads::Common::AuthError->new().
55 Alternatively, there is a get_ and set_ method associated with each attribute
56 for retrieving or setting them dynamically.
57  
58 =head2 message
59  
60 Holds the error message.
61  
62 =head2 code
63  
64 Holds the HTTP code associated to the error.
65  
66 =head2 content
67  
68 Holds the body of the error response.
69  
70 =head1 LICENSE AND COPYRIGHT
71  
72 Copyright 2012 Google Inc.
73  
74 Licensed under the Apache License, Version 2.0 (the "License");
75 you may not use this file except in compliance with the License.
76 You may obtain a copy of the License at
77  
78 http://www.apache.org/licenses/LICENSE-2.0
79  
80 Unless required by applicable law or agreed to in writing, software
81 distributed under the License is distributed on an "AS IS" BASIS,
82 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
83 See the License for the specific language governing permissions and
84 limitations under the License.
85  
86 =head1 REPOSITORY INFORMATION
87  
88 $Rev: $
89 $LastChangedBy: $
90 $Id: $
91  
92 =cut
« lib/Google/Ads/AdWords/v201809/TrialService/TrialServiceInterfacePort.pm ↑ Summary lib/Google/Ads/Common/ReportDownloadError.pm »