Module: Jbr::Cliental

Included in:
Job, Property, Visit
Defined in:
lib/jbr/cliental.rb

Overview

Extends a record that names the client the work is for: a visit, a job, a property, anything Jobber files under somebody.

Constant Summary collapse

FIELDS =

What Jobber calls each field of that client.

%w[id firstName lastName companyName email]
SELECTION =

What to ask for wherever a record names its client.

"client { #{FIELDS.join ' '} #{Phone::SELECTION} }"

Instance Method Summary collapse

Instance Method Details

#clientClient

Returns who the work is for.

Returns:

  • (Client)

    who the work is for.



12
# File 'lib/jbr/cliental.rb', line 12

def client = Client.new node: @node.fetch('client', {})