Total Complexity | 4 |
Total Lines | 46 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class SalesforceTest extends BuildTask |
||
11 | { |
||
12 | protected $title = 'Test Sales Force API'; |
||
13 | |||
14 | protected $description = 'Test Sales Cloud'; |
||
15 | |||
16 | protected $email = '@test.best.co.com.org.net'; |
||
17 | |||
18 | public function run($request) |
||
19 | { |
||
20 | MySalesforceContactApi::set_debug(true); |
||
21 | |||
22 | $this->email = 'test'.rand(0,99999).$this->email; |
||
23 | |||
24 | $this->findContact(); |
||
25 | $this->createContact(); |
||
26 | $this->updateContact(); |
||
27 | } |
||
28 | |||
29 | protected function createContact() |
||
37 | ] |
||
38 | ); |
||
39 | } |
||
40 | |||
41 | protected function updateContact() |
||
42 | { |
||
43 | MySalesforceContactApi::update_contact( |
||
44 | [ |
||
45 | 'FirstName' => 'Joan', |
||
46 | 'LastName' => 'Smith', |
||
47 | 'Phone' => '(510) 555-5555', |
||
48 | 'Email' => $this->email, |
||
49 | ] |
||
50 | ); |
||
51 | } |
||
52 | |||
53 | protected function findContact() |
||
56 | } |
||
57 | |||
58 | |||
60 |