Net-Simplify
view release on metacpan or search on metacpan
lib/Net/Simplify/ApiException.pm view on Meta::CPAN
package Net::Simplify::ApiException;
=head1 NAME
Net::Simplify::ApiException - Simplify Commerce exception base class.
=head1 SYNOPSIS
use Net::Simplify;
$Net::Simplify::public_key = 'YOUR PUBLIC KEY';
$Net::Simplify::private_key = 'YOUR PRIVATE KEY';
eval {
my $payment = Net::Simplify::Payment->create(...);
};
if ($@) {
if ($@->isa('Net::Simplify::ApiException')) {
my $message = $@->message;
my $code = $@->code;
printf "API Exception: %s %s\n", $@->message, $@->code;
}
}
=head1 DESCRIPTION
All exceptions thrown when using the API have the ApiException as their base class.
=head3 status()
Returns the HTTP status code for the API exception (if any).
=head3 code()
Returns error code for the API exeption (if any).
=head3 reference()
Returns the reference string for the API exception (if any).
=head3 message()
Returns the error message for the API exception.
=head3 stringify()
Returns a string representation of the exception.
=head3 longmess()
Returns the callstack.
=head1 SEE ALSO
L<Net::Simplify>,
L<Net::Simplify::IllegalArgumentException>,
L<Net::Simplify::AuthorizationException>,
L<Net::Simplify::ObjectNotFoundException>,
L<Net::Simplify::NotAllowedException>,
L<Net::Simplify::BadRequestException>,
L<Net::Simplify::SystemException>,
L<Net::Simplify::FieldError>,
L<http://www.simplify.com>
=head1 VERSION
1.6.0
=head1 LICENSE
Copyright (c) 2013 - 2022 MasterCard International Incorporated
All rights reserved.
( run in 0.515 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )