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