Skip to content

Commit

Permalink
Merge pull request #17 from otzy/patch-5
Browse files Browse the repository at this point in the history
update multiple contacts field mapping
  • Loading branch information
Jérôme Poskin committed Aug 14, 2015
2 parents 8f2763e + b710244 commit 763d854
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Snowcap/Emarsys/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,12 @@ public function createContact(array $data)
*/
public function updateContact(array $data)
{
if (isset($data['contacts']) && is_array($data['contacts'])){
foreach($data['contacts'] as &$contact){
$contact = $this->mapFieldsToIds($contact);
}
}

return $this->send(HttpClient::PUT, 'contact', $this->mapFieldsToIds($data));
}

Expand Down

0 comments on commit 763d854

Please sign in to comment.