Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
IsraelOrtuno committed Jul 3, 2020
2 parents 817a81e + eed8107 commit 6a20f0c
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Complete Pipedrive API client for PHP

This won't take much time. You could use my referral code or link to get up to 45 days completely free of charge. Just sign up using this link or add the code to the billing section:

[af-devio](https://www.pipedrive.com/register?promocode=af-devio)
[pdp-devio](https://www.pipedrive.com/register?promocode=pdp-devio)

## Consider donating

Expand Down
3 changes: 2 additions & 1 deletion src/Resources/Deals.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@

use Devio\Pipedrive\Http\Response;
use Devio\Pipedrive\Resources\Basics\Entity;
use Devio\Pipedrive\Resources\Traits\Searches;
use Devio\Pipedrive\Resources\Traits\ListsProducts;
use Devio\Pipedrive\Resources\Traits\ListsAttachedFiles;

class Deals extends Entity
{
use ListsProducts, ListsAttachedFiles;
use ListsProducts, ListsAttachedFiles, Searches;

/**
* Get the deals timeline.
Expand Down
3 changes: 2 additions & 1 deletion src/Resources/Organizations.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
use Devio\Pipedrive\Resources\Basics\Entity;
use Devio\Pipedrive\Resources\Traits\ListsDeals;
use Devio\Pipedrive\Resources\Traits\ListsAttachedFiles;
use Devio\Pipedrive\Resources\Traits\Searches;

class Organizations extends Entity
{
use ListsDeals, ListsAttachedFiles;
use ListsDeals, ListsAttachedFiles, Searches;

/**
* List the persons of a resource.
Expand Down
4 changes: 3 additions & 1 deletion src/Resources/Persons.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
use Devio\Pipedrive\Resources\Traits\ListsDeals;
use Devio\Pipedrive\Resources\Traits\ListsProducts;
use Devio\Pipedrive\Resources\Traits\ListsAttachedFiles;
use Devio\Pipedrive\Resources\Traits\Searches;

class Persons extends Entity
{
use ListsDeals,
ListsProducts,
ListsAttachedFiles;
ListsAttachedFiles,
Searches;
}
2 changes: 2 additions & 0 deletions src/Resources/Products.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
use Devio\Pipedrive\Resources\Traits\FindsByName;
use Devio\Pipedrive\Resources\Traits\ListsAttachedFiles;
use Devio\Pipedrive\Resources\Traits\ListsPermittedUsers;
use Devio\Pipedrive\Resources\Traits\Searches;

class Products extends Resource
{
use FindsByName,
Searches,
ListsAttachedFiles,
ListsDeals,
ListsPermittedUsers;
Expand Down
22 changes: 22 additions & 0 deletions src/Resources/Traits/Searches.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

namespace Devio\Pipedrive\Resources\Traits;

use Devio\Pipedrive\Http\Response;

trait Searches
{
/**
* @param $term
* @param array $fields
*
* @return Response
*/
public function search($term, $fields = [])
{
$options['term'] = $term;
$options['fields'] = $fields;

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

0 comments on commit 6a20f0c

Please sign in to comment.