-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtest.php
36 lines (30 loc) · 1018 Bytes
/
test.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
/**
* Update Prospect Test
* This is a basic action to populate a prospect object
* Then we can use magical getters and setters
* to update the data array.
* This should work on default and custom fields.
* LAST TESTED 6/6/2012
*/
include('./PardotConnector.class.php');
include('./Prospect.class.php');
$p = new Prospect();
$p = $p->fetchProspectByEmail('[email protected]');
$p->email = '[email protected]';
$p->save();
$p->email = '[email protected]';
$p->save();
$connector = new PardotConnector();
$connector->authenticate();
//Test our basic method
$prospect = $connector->prospectUpsert(array('email'=>'[email protected]'));
$prospect = $connector->read('prospect',array('email'=>'[email protected]'));
$prospect = $connector->prospectRead(array('email'=>'[email protected]'));
//test account getter (no param)
$account = $connector->accountRead();
//basic method
$campaigns = $connector->query('campaign',array('updated_after'=>'last year'));
//fluid method
$connector->campaignQuery();
$connector->formQuery();