WebService::Freshservice::User - Freshservice User
my $request = WebService::Freshservice::User->new( api => $api, id => '1234567890' );
Requires an 'WebService::Freshservice::API' object and user id.
Provides a Freshservice user object. Though users are referred to as 'Requesters' and 'Agents', agents are a super set of a user.
Returns 1 on success. Croaks on failure.
The following attributes can be updated and 'PUT' against the API:
address description email external_id language
location_name job_title mobile name phone time_zone
Optionally takes named attributes of 'attr' and 'value' if only updating a single attribute.
$requester->update_requester( attr => 'address', value => 'Some new address' );
API returns 200 OK and no content regardless if the put resulted in a successful change. Returns 1, croaks on failure.
Will return a hash of WebService::Freshservice::User::CustomField objects. Returns an empty object if your Freshservice instance doesn't have any custom fields configured.
field => 'cf_field_name',
value => 'field value',
Set a custom field value. Takes an optional attribute of 'update' which can be set to '0' and it will not 'PUT' the changes (handy if you are trying to limit API calls and want are calling '$requester->update_requester' later);
$custom_field = $updated->get_custom_field('cf_field_name');
Returns a WebService::Freshservice::User::CustomField object of the named Custom Field. Croaks if the field doesn't exist in Freshservice.
Leon Wright <email@example.com>
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.
To install WebService::Freshservice, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.