s;
use Clone 'clone';
use Date::Utility;
use Data::UUID;
use File::Basename;
use Path::Tiny;
use JSON::MaybeUTF8 qw(:v1);
use MIME::Base64;
# New HTTP server implementation
use Net::Async::HTTP::Ser
'/v3.4/applicants' => sub {
my $req = shift;
my $data = decode_json_utf8($req->body);
my $id = Data::UUID->new->create_str();
my $appl
>{$k} = $data->{$k};
}
$applicants{$id} = $applicant;
return json_response($req, $applicant);
},
'/v3.4/documents' => sub {
my $req
ile::Basename;
use Path::Tiny;
use Net::Async::HTTP;
use HTTP::Request::Common;
use JSON::MaybeUTF8 qw(:v1);
use JSON::MaybeXS;
use File::ShareDir;
use URI::Escape qw(uri_escape_utf8);
use Scalar::Ut
);
use constant SUPPORTED_COUNTRIES_URL => 'https://documentation.onfido.com/identityISOsupported.json';
# Mapping file extension to mime type for currently
# supported document types
my %FILE_MIME_T
try {
my ($res) = @_;
my $data = decode_json_utf8($res->content);
$log->tracef('Have response %s', $data);
endpoint
Expands the selected URI via L<URI::Template>. Each item is defined in our C<endpoints.json>
file.
Returns a L<URI> instance.
=head2 is_rate_limited
Returns true if we are currently rate