Class: Jbr::Visit
- Defined in:
- lib/jbr/visit.rb
Overview
One stop at a property: when the work on a job is scheduled to happen.
Direct Known Subclasses
Constant Summary
Constants included from Cliental
Cliental::FIELDS, Cliental::SELECTION
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
-
#all_day? ⇒ Boolean?
Whether the visit takes the whole day rather than an hour of it.
-
#client_confirmed? ⇒ Boolean?
Whether the client has confirmed the visit.
-
#ends_at ⇒ Time?
The visit end time.
-
#job_id ⇒ String?
The ID of the job the visit belongs to.
-
#starts_at ⇒ Time?
The visit start time.
-
#title ⇒ String?
What the visit is called.
Methods included from Cliental
Methods included from Named
Methods included from Properted
Methods inherited from Resource
Constructor Details
This class inherits a constructor from Jbr::Resource
Instance Method Details
#all_day? ⇒ Boolean?
Returns whether the visit takes the whole day rather than an hour of it.
13 |
# File 'lib/jbr/visit.rb', line 13 def all_day? = @node['allDay'] |
#client_confirmed? ⇒ Boolean?
Returns whether the client has confirmed the visit.
16 |
# File 'lib/jbr/visit.rb', line 16 def client_confirmed? = @node['clientConfirmed'] |
#ends_at ⇒ Time?
Returns the visit end time.
22 |
# File 'lib/jbr/visit.rb', line 22 def ends_at = time 'endAt' |
#job_id ⇒ String?
Returns the ID of the job the visit belongs to.
10 |
# File 'lib/jbr/visit.rb', line 10 def job_id = @node.dig 'job', 'id' |
#starts_at ⇒ Time?
Returns the visit start time.
19 |
# File 'lib/jbr/visit.rb', line 19 def starts_at = time 'startAt' |
#title ⇒ String?
Returns what the visit is called.
7 |
# File 'lib/jbr/visit.rb', line 7 def title = @node['title'] |