Class: AFCSalesforce::Lead

Inherits:
Base
  • Object
show all
Defined in:
lib/afc_salesforce/lead.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#initialize

Methods included from Models::Concerns::TypeSetter

extended

Constructor Details

This class inherits a constructor from AFCSalesforce::Base

Instance Attribute Details

#cityObject

Returns the value of attribute city.



3
4
5
# File 'lib/afc_salesforce/lead.rb', line 3

def city
  @city
end

#companyObject

Returns the value of attribute company.



3
4
5
# File 'lib/afc_salesforce/lead.rb', line 3

def company
  @company
end

#emailObject

Returns the value of attribute email.



3
4
5
# File 'lib/afc_salesforce/lead.rb', line 3

def email
  @email
end

#endorserObject

Returns the value of attribute endorser.



3
4
5
# File 'lib/afc_salesforce/lead.rb', line 3

def endorser
  @endorser
end

#first_nameObject

Returns the value of attribute first_name.



3
4
5
# File 'lib/afc_salesforce/lead.rb', line 3

def first_name
  @first_name
end

#internet_sourceObject

Returns the value of attribute internet_source.



3
4
5
# File 'lib/afc_salesforce/lead.rb', line 3

def internet_source
  @internet_source
end

#last_nameObject

Returns the value of attribute last_name.



3
4
5
# File 'lib/afc_salesforce/lead.rb', line 3

def last_name
  @last_name
end

#page_urlObject

Returns the value of attribute page_url.



3
4
5
# File 'lib/afc_salesforce/lead.rb', line 3

def page_url
  @page_url
end

#page_variantObject

Returns the value of attribute page_variant.



3
4
5
# File 'lib/afc_salesforce/lead.rb', line 3

def page_variant
  @page_variant
end

#phoneObject

Returns the value of attribute phone.



3
4
5
# File 'lib/afc_salesforce/lead.rb', line 3

def phone
  @phone
end

#search_adgroupObject

Returns the value of attribute search_adgroup.



3
4
5
# File 'lib/afc_salesforce/lead.rb', line 3

def search_adgroup
  @search_adgroup
end

#search_campaignObject

Returns the value of attribute search_campaign.



3
4
5
# File 'lib/afc_salesforce/lead.rb', line 3

def search_campaign
  @search_campaign
end

#search_keywordObject

Returns the value of attribute search_keyword.



3
4
5
# File 'lib/afc_salesforce/lead.rb', line 3

def search_keyword
  @search_keyword
end

#search_sourceObject

Returns the value of attribute search_source.



3
4
5
# File 'lib/afc_salesforce/lead.rb', line 3

def search_source
  @search_source
end

#sourceObject

Returns the value of attribute source.



3
4
5
# File 'lib/afc_salesforce/lead.rb', line 3

def source
  @source
end

#stateObject

Returns the value of attribute state.



3
4
5
# File 'lib/afc_salesforce/lead.rb', line 3

def state
  @state
end

#typeObject

Returns the value of attribute type.



3
4
5
# File 'lib/afc_salesforce/lead.rb', line 3

def type
  @type
end

#unbounce_page_idObject

Returns the value of attribute unbounce_page_id.



3
4
5
# File 'lib/afc_salesforce/lead.rb', line 3

def unbounce_page_id
  @unbounce_page_id
end

#zipObject

Returns the value of attribute zip.



3
4
5
# File 'lib/afc_salesforce/lead.rb', line 3

def zip
  @zip
end

Instance Method Details

#to_hObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/afc_salesforce/lead.rb', line 7

def to_h
  AFCSalesforce::Models::Lead.new(
    firstname: @first_name,
    lastname: @last_name,
    phone: @phone,
    email: @email,
    company: @company,
    endorser__c: @endorser,
    source__c: @source,
    type__c: @type,
    internetsource__c: @internet_source,
    searchsource__c: @search_source,
    searchcampaign__c: @search_campaign,
    searchadgroup__c: @search_adgroup,
    searchkeyword__c: @search_keyword,
    city: @city,
    state: @state,
    postalcode: @zip,
    unbounce_page_id__c: @unbounce_page_id,
    page_url__c: @page_url,
    page_variant__c: @page_variant
  ).to_h
end