The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WebService::Freshservice - Abstraction layer to the Freshservice API

VERSION

version 0.004

SYNOPSIS

  use WebService::Freshservice;
  
  my $freshservice = WebService::Freshservice->new( apikey => '1234567890abcdef' );

DESCRIPTION

WebService::Freshservice is an abstraction layer to the Freshservice API.

METHODS

requester

  $freshservice->requester( id => '123456789' );

Returns a WebService::Freshservice::User on success, croaks on failure. Optionally if you can use the attribute 'email' and it will search returning the first result, croaking if not found.

requesters

  $freshservice->requesters( email => 'test@example.com');

Perform a search on the provided attribute and optional state. If no query is set it will return the first 50 results.

Use one the following attributes, 'email', 'mobile' or 'phone'.

Optionally state can be set to one of 'verified', 'unverified', 'all' or 'deleted'. Defaults to 'all'.

Returns an array of 'WebService::Freshservice::User' objects or empty array if no results are found.

create_requester

  $freshservice->create_requester( name => 'Test', email => 'Test@email.com' );

Returns a WebService::Freshservice::User object on success, croaks on failure.

'name' is a mandatory attribute and requires at least one of 'email', 'phone' or 'mobile'.

Also accepts the following optional attributes: address, description, external_id, job_title, language, timezone.

agent

  $freshservice->agent( id => '123456789' );

Returns a WebService::Freshservice::Agent on success, croaks on failure. Optionally if you can use the attribute 'email' and it will search returning the first result, croaking if not found.

agent

  $freshservice->agent( email => 'test@example.com');

Perform a search on the provided attribute and optional state. If no query is set it will return the first 50 results.

Use one the following attributes, 'email', 'mobile' or 'phone'.

Optionally state can be set to one of 'verified', 'unverified', 'all' or 'deleted'. Defaults to 'all'.

Returns an array of 'WebService::Freshservice::Agent' objects or empty array if no results are found.

AUTHOR

Leon Wright <techman@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by Leon Wright.

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