ruby-jss 4.2.4 → 5.0.0b1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -187,6 +187,20 @@ module Jamf
187
187
  all(refresh, cnx: cnx).select { |d| d[:model_identifier].start_with? 'AppleTV' }
188
188
  end
189
189
 
190
+ # Get the MDM Management ID for a device by identifer
191
+ # @param ident [Integer,String] An identifier (id, name, serialnumber, macaddr)
192
+ # of the computer for which to retrieve the Management ID
193
+ # @param cnx [Jamf::Connection] an API connection to use for the query.
194
+ #
195
+ # @return [String, nil] the management ID, or nil if the computer is not MDM managed
196
+ ##########################################
197
+ def self.management_id(ident, cnx: Jamf.cnx)
198
+ jid = valid_id ident
199
+ raise Jamf::NoSuchItemError, "No MobileDevice with identifier '#{ident}'" unless jid
200
+
201
+ cnx.jp_get("v2/mobile-devices/#{jid}")[:managementId]
202
+ end
203
+
190
204
  # Attributes
191
205
  #####################################
192
206
 
@@ -491,6 +505,12 @@ module Jamf
491
505
  end
492
506
  end # initialize
493
507
 
508
+ # The management id for this device
509
+ # @return [String, nil] the management ID, or nil if the device is not MDM managed
510
+ def management_id
511
+ @management_id ||= self.class.management_id @id, cnx: @cnx
512
+ end
513
+
494
514
  def tv?
495
515
  model_identifier.start_with? HW_PREFIX_TV
496
516
  end
data/lib/jamf/version.rb CHANGED
@@ -9,6 +9,6 @@
9
9
  module Jamf
10
10
 
11
11
  ### The version of ruby-jss
12
- VERSION = '4.2.4'.freeze
12
+ VERSION = '5.0.0b1'.freeze
13
13
 
14
14
  end # module
@@ -102,6 +102,7 @@ module JamfZeitwerkConfig
102
102
  loader.inflector.inflect 'osx_configuration_profile' => 'OSXConfigurationProfile'
103
103
  loader.inflector.inflect 'jp_extendable' => 'JPExtendable'
104
104
  loader.inflector.inflect 'mdm' => 'MDM'
105
+ loader.inflector.inflect 'jmdm' => 'JMDM'
105
106
  loader.inflector.inflect 'ibeacon' => 'IBeacon'
106
107
  loader.inflector.inflect 'powerbroker_identity_services' => 'PowerBroker'
107
108
  loader.inflector.inflect 'admitmac' => 'ADmitMac'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-jss
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.4
4
+ version: 5.0.0b1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Lasell
@@ -9,22 +9,28 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2025-11-14 00:00:00.000000000 Z
12
+ date: 2025-12-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: CFPropertyList
15
+ name: pixar-ruby-extensions
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '3.0'
20
+ version: '1.0'
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: '1.12'
21
24
  type: :runtime
22
25
  prerelease: false
23
26
  version_requirements: !ruby/object:Gem::Requirement
24
27
  requirements:
25
28
  - - "~>"
26
29
  - !ruby/object:Gem::Version
27
- version: '3.0'
30
+ version: '1.0'
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '1.12'
28
34
  - !ruby/object:Gem::Dependency
29
35
  name: ruby-mysql
30
36
  requirement: !ruby/object:Gem::Requirement
@@ -45,6 +51,20 @@ dependencies:
45
51
  - - ">="
46
52
  - !ruby/object:Gem::Version
47
53
  version: 2.9.12
54
+ - !ruby/object:Gem::Dependency
55
+ name: CFPropertyList
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '3.0'
61
+ type: :runtime
62
+ prerelease: false
63
+ version_requirements: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '3.0'
48
68
  - !ruby/object:Gem::Dependency
49
69
  name: faraday
50
70
  requirement: !ruby/object:Gem::Requirement
@@ -228,6 +248,7 @@ files:
228
248
  - lib/jamf/api/classic/api_objects/management_history/user_location_change.rb
229
249
  - lib/jamf/api/classic/api_objects/matchable.rb
230
250
  - lib/jamf/api/classic/api_objects/mdm.rb
251
+ - lib/jamf/api/classic/api_objects/mdm_classic.rb
231
252
  - lib/jamf/api/classic/api_objects/mobile_device.rb
232
253
  - lib/jamf/api/classic/api_objects/mobile_device_application.rb
233
254
  - lib/jamf/api/classic/api_objects/mobile_device_configuration_profile.rb
@@ -523,9 +544,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
523
544
  version: 2.6.3
524
545
  required_rubygems_version: !ruby/object:Gem::Requirement
525
546
  requirements:
526
- - - ">="
547
+ - - ">"
527
548
  - !ruby/object:Gem::Version
528
- version: '0'
549
+ version: 1.3.1
529
550
  requirements: []
530
551
  rubygems_version: 3.0.3.1
531
552
  signing_key: