Class: Company::Lead

Inherits:
Resource show all
Defined in:
lib/company/resources/lead.rb

Overview

Somebody who asked the business for work and is not a customer yet.

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Resource

#id, #initialize, keys, node_keys

Constructor Details

This class inherits a constructor from Company::Resource

Class Method Details

.attributes ⇒ Object

What every lead reads, by the vocabulary's names.



5
# File 'lib/company/resources/lead.rb', line 5

def self.attributes = i[id]

Instance Method Details

#customer ⇒ Customer?

Returns customer the lead was filed for, where they came back beside it.

Returns:

  • (Customer, nil) —

    customer the lead was filed for, where they came back beside it.



8
# File 'lib/company/resources/lead.rb', line 8

def customer = record Customer, :customer

#location ⇒ Location?

Returns where the work would happen, where the platform named it.

Returns:

  • (Location, nil) —

    where the work would happen, where the platform named it.



11
# File 'lib/company/resources/lead.rb', line 11

def location = record Location, :location