Net-Simplify

 view release on metacpan or  search on metacpan

lib/Net/Simplify/FieldError.pm  view on Meta::CPAN


package Net::Simplify::FieldError;


=head1 NAME

Net::Simplify::FieldError - Simplify Commerce field error 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::BadRequestException')) {
          if ($@->has_field_errors) {
              foreach my $error ($@->field_errors) {
                  my $c = $error->code;
                  my $f = $error->field;
                  my $m = $error->message;
                  printf "Field error: %s - '%s' (%s)\n", $f, $m, $c;
              }
          }
      }
  }
 
=head1 DESCRIPTION

Represents a single error in an API request to create or update a domain object.

=head2 METHODS

=head3 field()

The name of the field with the error.

=head3 code()

The field error code.

=head3 message()

A textual description of the error.

=head3 stringify()

A string representation of the field error.

=head1 SEE ALSO

L<Net::Simplify>,
L<Net::Simplify::BadRequestException>,
L<http://www.simplify.com>

=head1 VERSION

1.6.0

=head1 LICENSE

Copyright (c) 2013 - 2022 MasterCard International Incorporated
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are 
permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of 
conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of 



( run in 0.871 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )