Class: Company::Leads

Inherits:
Object
  • Object
show all
Defined in:
lib/company/collections/leads.rb

Overview

The leads of a business: who asked it for work, before there is a job. A gem answers create with the lead its platform filed, dropping what the platform has no field for.

Instance Method Summary collapse

Instance Method Details

#create(name:, surname:, phone:, email:, address:, description:, notes:, source:) ⇒ Lead

Returns the lead as the platform filed it.

Parameters:

  • name (String) —

    given name of who asked, or the business's where a person has none.

  • surname (String, nil) —

    their surname.

  • phone (String, nil) —

    number they are reached on.

  • email (String, nil) —

    address they are written to.

  • address (Hash, nil) —

    where the work would happen: :street, :city, :state and :zip.

  • description (String) —

    what the work is called.

  • notes (String, nil) —

    what else was said about it.

  • source (String, nil) —

    where the lead came from, as the business names its sources.

Returns:

  • (Lead) —

    the lead as the platform filed it.

Raises:

  • (NotImplementedError)


14
15
16
# File 'lib/company/collections/leads.rb', line 14

def create(name:, surname:, phone:, email:, address:, description:, notes:, source:)
  raise NotImplementedError, "#{self.class} does not file a lead"
end