ruby-jss provides native ruby access to the REST APIs of Jamf Pro, an enterprise/education tool for managing Apple devices, from jamf.com. The Jamf module provides access to both APIs. Jamf Pro objects are implemented as classes and interact with each other. Authentication tokens, data format and other details are handled under the hood to allow simpler, intuitive automation of Jamf-related tasks.
While using JSS::Printer object, if you attempt to pass through a JSS::APIConnection object, it won't honor it. Instead, before calling upon the JSS::Printer object, you must first do JSS.use_api saved_api_connection for it to properly grab the printer object you want.
Specific error:
9: from /Library/Ruby/Gems/2.6.0/gems/ruby-jss-1.3.3/lib/jss/api_object.rb:854:in `fetch'
8: from /Library/Ruby/Gems/2.6.0/gems/ruby-jss-1.3.3/lib/jss/api_object.rb:1001:in `new'
7: from /Library/Ruby/Gems/2.6.0/gems/ruby-jss-1.3.3/lib/jss/api_object.rb:1001:in `new'
6: from /Library/Ruby/Gems/2.6.0/gems/ruby-jss-1.3.3/lib/jss/api_object/printer.rb:90:in `initialize'
5: from /Library/Ruby/Gems/2.6.0/gems/ruby-jss-1.3.3/lib/jss/api_object.rb:1118:in `initialize'
4: from /Library/Ruby/Gems/2.6.0/gems/ruby-jss-1.3.3/lib/jss/api_object.rb:1462:in `parse_init_data'
3: from /Library/Ruby/Gems/2.6.0/gems/ruby-jss-1.3.3/lib/jss/api_object.rb:1496:in `initialize_category'
2: from /Library/Ruby/Gems/2.6.0/gems/ruby-jss-1.3.3/lib/jss/api_object/categorizable.rb:201:in `parse_category'
1: from /Library/Ruby/Gems/2.6.0/gems/ruby-jss-1.3.3/lib/jss/api_object/category.rb:56:in `category_id_from_name'
/Library/Ruby/Gems/2.6.0/gems/ruby-jss-1.3.3/lib/jss/api_object.rb:529:in `map_all_ids_to': undefined method `[]' for nil:NilClass (NoMethodError)```
While using
JSS::Printer
object, if you attempt to pass through aJSS::APIConnection
object, it won't honor it. Instead, before calling upon theJSS::Printer
object, you must first doJSS.use_api saved_api_connection
for it to properly grab the printer object you want.Specific error: