Class: Jbr::Visits
- Includes:
- Includable, Listable
- Defined in:
- lib/jbr/visits.rb
Overview
The visits on a Jobber account, oldest first, walked a page at a time.
Direct Known Subclasses
Constant Summary collapse
- FIELDS =
What a visit answers with, before anything it was asked to bring back with it.
'id title startAt endAt allDay clientConfirmed job { id }'
Constants included from Listable
Listable::IDS_PAGE, Listable::PAGE
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
-
#find(id) ⇒ Visit?
Shadows Enumerable#find on purpose, the way jobs do: a visit is reached by the ID Jobber files it under, not by asking every visit 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) ⇒ Visit?
Shadows Enumerable#find on purpose, the way jobs do: a visit is reached by the ID Jobber files it under, not by asking every visit on the account whether it is the one.
13 14 15 16 |
# File 'lib/jbr/visits.rb', line 13 def find(id) node = @oauth.query(one, variables: { id: id })['visit'] Visit.new node: node if node end |