Module: LuluApi::Client::PrintJobs

Included in:
LuluApi::Client
Defined in:
lib/lulu_api/client/print_jobs.rb

Instance Method Summary collapse

Instance Method Details

#create_print_job(job) ⇒ Object



36
37
38
39
40
41
# File 'lib/lulu_api/client/print_jobs.rb', line 36

def create_print_job(job)
  LuluApi.logger.debug 'Lulu: Creating print job'
  make_api_call do
    self.class.post("/print-jobs", { body: job.to_json })
  end
end

#get_print_job(id) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/lulu_api/client/print_jobs.rb', line 13

def get_print_job(id)
  LuluApi.logger.debug 'Lulu: Getting print job'

  make_api_call do
    self.class.get("/print-jobs/#{id}")
  end
end

#get_print_job_costs(id) ⇒ Object



21
22
23
24
25
26
27
# File 'lib/lulu_api/client/print_jobs.rb', line 21

def get_print_job_costs(id)
  LuluApi.logger.debug 'Lulu: Getting print job cost'

  make_api_call do
    self.class.get("/print-jobs/#{id}/costs")
  end
end

#get_print_job_status(id) ⇒ Object



29
30
31
32
33
34
# File 'lib/lulu_api/client/print_jobs.rb', line 29

def get_print_job_status(id)
  LuluApi.logger.debug 'Lulu: Getting print job status'
  make_api_call do
    self.class.get("/print-jobs/#{id}/status")
  end
end

#list_print_jobs(options = {}) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/lulu_api/client/print_jobs.rb', line 5

def list_print_jobs(options = {})
  LuluApi.logger.debug 'Lulu: Listing print jobs'

  make_api_call do
    self.class.get("/print-jobs", { query: options })
  end
end