Class: Jbr::Visit

Inherits:
Resource show all
Includes:
Cliental, Properted
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

Mock::Visit

Constant Summary

Constants included from Cliental

Cliental::FIELDS, Cliental::SELECTION

Instance Attribute Summary

Attributes inherited from Resource

#id

Instance Method Summary collapse

Methods included from Cliental

#client

Methods included from Properted

#property, selection

Methods inherited from Resource

#initialize

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.

Returns:

  • (Boolean, nil)

    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.

Returns:

  • (Boolean, nil)

    whether the client has confirmed the visit.



16
# File 'lib/jbr/visit.rb', line 16

def client_confirmed? = @node['clientConfirmed']

#ends_atTime?

Returns the visit end time.

Returns:

  • (Time, nil)

    the visit end time



22
# File 'lib/jbr/visit.rb', line 22

def ends_at = time 'endAt'

#job_idString?

Returns the ID of the job the visit belongs to.

Returns:

  • (String, nil)

    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_atTime?

Returns the visit start time.

Returns:

  • (Time, nil)

    the visit start time



19
# File 'lib/jbr/visit.rb', line 19

def starts_at = time 'startAt'

#titleString?

Returns what the visit is called.

Returns:

  • (String, nil)

    what the visit is called.



7
# File 'lib/jbr/visit.rb', line 7

def title = @node['title']