Skip to content

Commit

Permalink
Merge pull request #76 from mshahidrasheed/master
Browse files Browse the repository at this point in the history
Mailbox class added in resource
  • Loading branch information
IsraelOrtuno authored Nov 7, 2019
2 parents b59b6b0 + 7447157 commit 0aaecbd
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions src/Resources/Mailbox.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php

namespace Devio\Pipedrive\Resources;

use Devio\Pipedrive\Http\Response;
use Devio\Pipedrive\Resources\Basics\Resource;

class Mailbox extends Resource
{
/**
* Get the Mail threads details by ID.
*
* @param $id Mail threads ID to find.
* @return Response
*/
public function find($id)
{
return $this->request->get('mailThreads/:id', compact('id'));
}

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

return $this->request->get('mailThreads', $options);
}

/**
* Get mail messages inside specified mail thread by ID.
*
* @param $id Mail threads ID to find messages.
* @return Response
*/
public function mailMessages($id)
{
return $this->request->get('mailThreads/:id/mailMessages', compact('id'));
}
}

0 comments on commit 0aaecbd

Please sign in to comment.