Class: Pardot::Objects::ProspectAccounts::ProspectAccounts

Inherits:
Object
  • Object
show all
Defined in:
lib/pardot/objects/prospect_accounts.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ ProspectAccounts

Returns a new instance of ProspectAccounts.



10
11
12
# File 'lib/pardot/objects/prospect_accounts.rb', line 10

def initialize(client)
  @client = client
end

Instance Method Details

#create(params = {}) ⇒ Object



25
26
27
# File 'lib/pardot/objects/prospect_accounts.rb', line 25

def create(params={})
  post('/do/create', params)
end

#describe(params = {}) ⇒ Object



21
22
23
# File 'lib/pardot/objects/prospect_accounts.rb', line 21

def describe(params={})
  post('/do/describe', params)
end

#query(search_criteria) ⇒ Object



14
15
16
17
18
19
# File 'lib/pardot/objects/prospect_accounts.rb', line 14

def query(search_criteria)
  result = get '/do/query', search_criteria, 'result'
  result['total_results'] = result['total_results'].to_i if
    result['total_results']
  result
end