Class: Jamf::Department
- Inherits:
-
CollectionResource
- Object
- JSONObject
- Resource
- CollectionResource
- Jamf::Department
- Includes:
- ChangeLog
- Defined in:
- lib/jamf/api/resources/collection_resources/department.rb
Overview
A building defined in the JSS
Constant Summary collapse
- RSRC_VERSION =
Constants
'v1'.freeze
- RSRC_PATH =
'departments'.freeze
- BULK_DELETE_RSRC =
TODO: Jamf - will this be standard for collections?
'delete-multiple'.freeze
- OBJECT_MODEL =
Object Model / Attributes See APIObject class documentation for details of how the OBJECT_MODEL hash works.
{ # @!attribute [r] id # @return [Integer] id: { class: :integer, identifier: :primary, readonly: true }, # @!attribute name # @return [String] name: { class: :string, identifier: true, validator: :non_empty_string, required: true } }.freeze
Instance Attribute Summary collapse
- #id ⇒ Integer readonly
- #name ⇒ String
Instance Method Summary collapse
-
#add_change_log_note(note, cnx: Jamf.cnx) ⇒ void
included
from ChangeLog
Add a note to this resource's change log.
-
#change_log(sort: nil, filter: nil, paged: nil, page_size: nil, refresh: false, cnx: Jamf.cnx) ⇒ Array<Jamf::ChangeLogEntry>
included
from ChangeLog
The change and note history for this resource.
-
#change_log_count(cnx: Jamf.cnx) ⇒ Integer
included
from ChangeLog
how many change log entries are there? needed when using paged #change_log calls.
-
#next_page_of_change_log ⇒ Array<Jamf::ChangeHistoryEntry>
included
from ChangeLog
Fetch the next page of a paged #change_log request Returns an empty array if there's been no paged request or if the last one has no more pages.
Constructor Details
This class inherits a constructor from Jamf::JSONObject
Instance Attribute Details
#id ⇒ Integer (readonly)
|
# File 'lib/jamf/api/resources/collection_resources/department.rb', line 56
|
Instance Method Details
#add_change_log_note(note, cnx: Jamf.cnx) ⇒ void Originally defined in module ChangeLog
This method returns an undefined value.
Add a note to this resource's change log.
If the change history has been cached already, the cache is flushed after adding the note.
#change_log(sort: nil, filter: nil, paged: nil, page_size: nil, refresh: false, cnx: Jamf.cnx) ⇒ Array<Jamf::ChangeLogEntry> Originally defined in module ChangeLog
The change and note history for this resource. This is a collection of objects as a sub-resource of some primary resource. As such, retriving the change log returns an array of objects, and can be paged, sorted and filtered.
This method is very similar to CollectionResource.all, see the docs for that method for more details
successive page.
#change_log_count(cnx: Jamf.cnx) ⇒ Integer Originally defined in module ChangeLog
how many change log entries are there? needed when using paged #change_log calls