Skip to content

Commit

Permalink
Merge pull request #77 from mshahidrasheed/master
Browse files Browse the repository at this point in the history
More improvements in Mailbox
  • Loading branch information
IsraelOrtuno authored Nov 16, 2019
2 parents 0aaecbd + 5979073 commit b74aa31
Showing 1 changed file with 28 additions and 3 deletions.
31 changes: 28 additions & 3 deletions src/Resources/Mailbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,38 @@ public function find($id)
return $this->request->get('mailThreads/:id', compact('id'));
}

/**
* Delete Mail threads by ID.
*
* @param $id Mail threads ID to delete.
* @return Response
*/
public function delete($id)
{
return $this->request->delete('mailThreads/:id', compact('id'));
}

/**
* Update Mail threads by ID.
*
* @param $id
* @param array $values
* @return Response
*/
public function update($id, array $values)
{
$values['id'] = $id;
return $this->request->put('mailThreads/:id', $values);
}

/**
* Get list of mail threads
*
* @param $folder
* @param array $options
* @return Response
*/
public function mailThreads($folder, $options = [])
public function mailThreads($folder, array $options = [])
{
$options['folder'] = $folder;

Expand All @@ -38,8 +62,9 @@ public function mailThreads($folder, $options = [])
* @param $id Mail threads ID to find messages.
* @return Response
*/
public function mailMessages($id)
public function mailMessages($id, $params=[])
{
return $this->request->get('mailThreads/:id/mailMessages', compact('id'));
$params['id'] = $id;
return $this->request->get('mailThreads/:id/mailMessages', $params);
}
}

0 comments on commit b74aa31

Please sign in to comment.