Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for GetLeadActivities call #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,13 @@ public function getLeadChanges($nextPageToken, $fields, $args = array(), $return
return $this->getResult('getLeadChanges', $args, true, $returnRaw);
}

public function getLeadActivities($nextPageToken, $args = array(), $returnRaw = false)
{
$args['nextPageToken'] = $nextPageToken;

return $this->getResult('getLeadActivities', $args, true, $returnRaw);
}

/**
* Update an editable section in an email
*
Expand Down
22 changes: 22 additions & 0 deletions src/Response/GetLeadActivities.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php
namespace CSD\Marketo\Response;

use CSD\Marketo\Response as Response;

/**
* Response for the getLead and getLeadByFilterType API method.
*
* @author Roberto Espinoza <[email protected]>
*/
class GetLeadActivities extends Response
{
public function getActivities()
{
if ($this->isSuccess()) {
$result = $this->getResult();
return $result;
}

return null;
}
}
14 changes: 14 additions & 0 deletions src/service.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,20 @@
},
"responseClass": "CSD\\Marketo\\Response\\GetLeadsResponse"
},
"getLeadActivities": {
"httpMethod": "GET",
"uri": "activities.json",
"parameters": {
"nextPageToken": {"location": "query"},
"batchSize": {"location": "query"},
"nextPageToken": {"location": "query"},
"listId": {"location": "query"},
"leadIds": {"location": "query"},
"activityTypeIds": {"location": "query"},
"assetIds": {"location": "query"}
},
"responseClass": "CSD\\Marketo\\Response\\GetLeadActivities"
},
"isMemberOfList": {
"httpMethod": "GET",
"uri": "lists/{listId}/leads/ismember.json",
Expand Down