Class: SfIntegrator::Lead

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Validations
Defined in:
lib/sf_integrator/lead.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeLead

Returns a new instance of Lead.



11
12
13
# File 'lib/sf_integrator/lead.rb', line 11

def initialize
  @client = Restforce.new(SfIntegrator::Integrator.configs.to_hash)
end

Instance Attribute Details

#clientObject

Returns the value of attribute client.



9
10
11
# File 'lib/sf_integrator/lead.rb', line 9

def client
  @client
end

#companyObject

Returns the value of attribute company.



9
10
11
# File 'lib/sf_integrator/lead.rb', line 9

def company
  @company
end

#emailObject

Returns the value of attribute email.



9
10
11
# File 'lib/sf_integrator/lead.rb', line 9

def email
  @email
end

#first_nameObject

Returns the value of attribute first_name.



9
10
11
# File 'lib/sf_integrator/lead.rb', line 9

def first_name
  @first_name
end

#job_titleObject

Returns the value of attribute job_title.



9
10
11
# File 'lib/sf_integrator/lead.rb', line 9

def job_title
  @job_title
end

#last_nameObject

Returns the value of attribute last_name.



9
10
11
# File 'lib/sf_integrator/lead.rb', line 9

def last_name
  @last_name
end

#phoneObject

Returns the value of attribute phone.



9
10
11
# File 'lib/sf_integrator/lead.rb', line 9

def phone
  @phone
end

#websiteObject

Returns the value of attribute website.



9
10
11
# File 'lib/sf_integrator/lead.rb', line 9

def website
  @website
end

Instance Method Details

#createObject



15
16
17
18
# File 'lib/sf_integrator/lead.rb', line 15

def create
  params = build_params
  client.create('Lead', params)
end