Method: PrintNode::Client#create_printjob
- Defined in:
- lib/printnode/client.rb
#create_printjob(printjob, options = {}) ⇒ Object
Sends a POST request to /printjobs/.
Returns:
The id of the printjob that was created.
440 441 442 443 444 445 446 447 448 |
# File 'lib/printnode/client.rb', line 440 def create_printjob(printjob, = {}) hash = printjob.to_hash if .each do |(k, v)| hash[k] = v end end JSON.parse('[' + post('/printjobs/', hash).body + ']')[0] end |