Class: Jbr::Job
- Defined in:
- lib/jbr/job.rb
Overview
Work a Jobber user accepted and scheduled.
Direct Known Subclasses
Constant Summary
Constants included from Cliental
Cliental::FIELDS, Cliental::SELECTION
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
-
#completed_at ⇒ Time?
The job completed time.
-
#created_at ⇒ Time?
The job opening time.
-
#instructions ⇒ String?
What the work is, in the words whoever opened the job wrote.
-
#name ⇒ String
A job goes untitled often enough, and something has to stand in for it on a list.
-
#quote_id ⇒ String?
The ID of the quote the job was won with.
-
#quote_total ⇒ Float?
What the quote the job was won with came to.
-
#scheduled_at ⇒ Time?
The job scheduled time.
-
#status ⇒ String?
Where Jobber files the job in its own workflow.
-
#title ⇒ String?
What the job is called, where whoever opened it named it.
-
#total ⇒ Float?
What the job comes to.
Methods included from Cliental
Methods included from Properted
Methods inherited from Resource
Constructor Details
This class inherits a constructor from Jbr::Resource
Instance Method Details
#completed_at ⇒ Time?
Returns the job completed time.
35 |
# File 'lib/jbr/job.rb', line 35 def completed_at = time 'completedAt' |
#created_at ⇒ Time?
Returns the job opening time.
29 |
# File 'lib/jbr/job.rb', line 29 def created_at = time 'createdAt' |
#instructions ⇒ String?
Returns what the work is, in the words whoever opened the job wrote.
14 |
# File 'lib/jbr/job.rb', line 14 def instructions = @node['instructions'] |
#name ⇒ String
A job goes untitled often enough, and something has to stand in for it on a list.
11 |
# File 'lib/jbr/job.rb', line 11 def name = title || id |
#quote_id ⇒ String?
Returns the ID of the quote the job was won with.
20 |
# File 'lib/jbr/job.rb', line 20 def quote_id = @node.dig 'quote', 'id' |
#quote_total ⇒ Float?
Returns what the quote the job was won with came to.
26 |
# File 'lib/jbr/job.rb', line 26 def quote_total = @node.dig 'quote', 'amounts', 'total' |
#scheduled_at ⇒ Time?
Returns the job scheduled time.
32 |
# File 'lib/jbr/job.rb', line 32 def scheduled_at = time 'startAt' |
#status ⇒ String?
Returns where Jobber files the job in its own workflow.
17 |
# File 'lib/jbr/job.rb', line 17 def status = @node['jobStatus'] |
#title ⇒ String?
Returns what the job is called, where whoever opened it named it.
7 |
# File 'lib/jbr/job.rb', line 7 def title = @node['title'] |
#total ⇒ Float?
Returns what the job comes to.
23 |
# File 'lib/jbr/job.rb', line 23 def total = @node['total'] |