NAME

WebService::Bugzilla::Role::Updatable - Role providing update method for Bugzilla API objects

VERSION

version 0.001

SYNOPSIS

# Consumed by API object classes:
with 'WebService::Bugzilla::Role::Updatable';

DESCRIPTION

A Moo::Role that provides an update method for Bugzilla API objects. The consuming class must implement _unwrap_key, which returns the API response key (e.g. 'bugs', 'users'). The REST resource path is derived by stripping the trailing s from that key.

METHODS

update

my $updated = $obj->update(%params);
my $updated = $svc->update($id, %params);

Send a PUT request to update an existing resource. Can be called as an instance method on a loaded object (uses the object's id) or as a service method with an explicit id.

Returns a new instance of the consuming class populated with the updated data.

REQUIRES

_unwrap_key

Must return the response hash key for the resource type (e.g. 'bugs').

SEE ALSO

WebService::Bugzilla::Attachment, WebService::Bugzilla::Bug, WebService::Bugzilla::Group, WebService::Bugzilla::Product, WebService::Bugzilla::User

AUTHOR

Dean Hamstead <dean@fragfest.com.au>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2026 by Dean Hamstead.

This is free software, licensed under:

The MIT (X11) License