Class: Jbr::Jobs
- Includes:
- Includable, Listable
- Defined in:
- lib/jbr/jobs.rb
Overview
The jobs on a Jobber account, oldest first, walked a page at a time.
Direct Known Subclasses
Constant Summary collapse
- FIELDS =
What a job answers with wherever one is read, before anything it was asked to bring back with it.
'id title instructions jobStatus total createdAt startAt completedAt ' \ 'quote { id amounts { total } }'
Constants included from Listable
Listable::IDS_PAGE, Listable::PAGE
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
-
#find(id) ⇒ Job?
Shadows Enumerable#find on purpose, the way Active Record does: a job is reached by the ID Jobber files it under, not by asking every job on the account whether it is the one.
Methods included from Includable
Methods included from Listable
Methods inherited from Resource
Constructor Details
This class inherits a constructor from Jbr::Resource
Instance Method Details
#find(id) ⇒ Job?
Shadows Enumerable#find on purpose, the way Active Record does: a job is reached by the ID Jobber files it under, not by asking every job on the account whether it is the one.
15 16 17 18 |
# File 'lib/jbr/jobs.rb', line 15 def find(id) node = @oauth.query(one, variables: { id: id })['job'] Job.new node: node if node end |