The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

WebService::MinFraud::Record::Warning - A warning record returned from a web service query

VERSION

version 0.001002

SYNOPSIS

  use 5.010;
  use WebService::MinFraud::Client;

  my $client = WebService::MinFraud::Client->new(
      user_id     => 42,
      license_key => 'abcdef123456',
  );
  my $request = { device => { ip_address => '24.24.24.24'} };
  my $insights = $client->insights( $request );
  foreach my $warning_object (@{$insights->warnings}) {
        say "WARNING CODE: ", $warning_object->code;
        say "WARNING MESSAGE: ", $warning_object->warning;
        say "WARNING INPUT PATH: ", join ' / ', @{$warning_object->input};
  }

DESCRIPTION

This class represents a MaxMind warning (if any) from a web service query.

METHODS

This class provides the following methods:

code

Returns a machine-readable code identifying the warning. See the API documentation for the current list.

input

Returns a reference to an array of keys and array indexes representing the path to the input that the warning is associated with. For instance, if the warning was about the billing city, the returned reference would be ["billing", "city"].

warning

Returns a human-readable explanation of the warning. This description may change at any time and should not be matched against.

PREDICATE METHODS

The following predicate methods are available, which return true if the related data was present in the response body, false if otherwise:

has_input

has_warning

AUTHOR

Mateu Hunter <mhunter@maxmind.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 by MaxMind, Inc..

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.