Skip to content
Open

Typo #16

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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ $note['person_id'] = $person['data']['id'];
$pipedrive->notes()->add($note);

//add deal to user
deal['title'] = 'example title';
$deal['title'] = 'example title';
$deal['stage_id'] = 8;
$deal['person_id'] = $person['data']['id'];

Expand Down
6 changes: 3 additions & 3 deletions src/Benhawker/Pipedrive/Library/Activities.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ public function __construct(\Benhawker\Pipedrive\Pipedrive $master)
}

/**
* Adds a activity
* Adds an activity
*
* @param array $data activity detials
* @return array returns detials of the activity
* @param array $data details of the activity
* @return array details of the activity
*/
public function add(array $data)
{
Expand Down
10 changes: 5 additions & 5 deletions src/Benhawker/Pipedrive/Library/Curl.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function __destruct()
* Makes cURL get Request
*
* @param string $method Pipedrive method
* @return array decoded Json Output
* @return array decoded JSON Output
*/
public function get($method, $data = array())
{
Expand All @@ -78,7 +78,7 @@ public function get($method, $data = array())
* Makes cURL get Request
*
* @param string $method Pipedrive method
* @return array decoded Json Output
* @return array decoded JSON Output
*/
public function post($method, array $data)
{
Expand All @@ -95,7 +95,7 @@ public function post($method, array $data)
* Makes cURL get Request
*
* @param string $method Pipedrive method
* @return array decoded Json Output
* @return array decoded JSON Output
*/
public function put($method, array $data)
{
Expand All @@ -111,7 +111,7 @@ public function put($method, array $data)
* Makes cURL get Request
*
* @param string $method Pipedrive method
* @return array decoded Json Output
* @return array decoded JSON Output
*/
public function delete($method)
{
Expand All @@ -125,7 +125,7 @@ public function delete($method)
/**
* Execute current cURL session
*
* @return array decoded json ouput
* @return array decoded JSON ouput
*/
protected function exec()
{
Expand Down
20 changes: 10 additions & 10 deletions src/Benhawker/Pipedrive/Library/DealFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use Benhawker\Pipedrive\Exceptions\PipedriveMissingFieldError;

/**
* Pipedrive Deals Methods
* Pipedrive DealFields Methods
*
* DealFields represent the near-complete schema for a Deal in the context of the company of the authorized user.
* Each company can have a different schema for their Deals, with various custom fields. In the context of using
Expand Down Expand Up @@ -34,31 +34,31 @@ public function __construct(\Benhawker\Pipedrive\Pipedrive $master)
}

/**
* Returns all deal fields
* Returns all dealFields
*
* @return array returns all dealFields
* @return array all dealFields
*/
public function getAll()
{
return $this->curl->get('dealFields');
}

/**
* Returns a deal field
* Returns a dealField
*
* @param int $id pipedrive dealField id
* @return array returns details of a dealField
* @param int $id ID of the field to fetch
* @return array details of the dealField
*/
public function getById($id)
public function getById($dealFieldId)
{
return $this->curl->get('dealFields/' . $id);
return $this->curl->get('dealFields/' . $dealFieldId);
}

/**
* Adds a dealField
*
* @param array $data deal field detials
* @return array returns details of the deal field
* @param array $data details of the dealField
* @return array details of the dealField
*/
public function add(array $data)
{
Expand Down
40 changes: 20 additions & 20 deletions src/Benhawker/Pipedrive/Library/Deals.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,19 @@ public function __construct(\Benhawker\Pipedrive\Pipedrive $master)
/**
* Returns a deal
*
* @param int $id pipedrive deals id
* @return array returns detials of a deal
* @param int $id ID of the deal
* @return array details of a deal
*/
public function getById($id)
public function getById($dealId)
{
return $this->curl->get('deals/' . $id);
return $this->curl->get('deals/' . $dealId);
}

/**
* Returns a deal / deals
* Find deals by name
*
* @param string $name pipedrive deals title
* @return array returns detials of a deal
* @param string $name search term to look for
* @return array found deals
*/
public function getByName($name, $personId=null, $orgId=null)
{
Expand All @@ -64,7 +64,7 @@ public function getByName($name, $personId=null, $orgId=null)
* Lists products associated with a deal.
*
* @param array $data (id, start, limit)
* @return array products
* @return array associated products
*/
public function products(array $data)
{
Expand All @@ -79,8 +79,8 @@ public function products(array $data)
/**
* Adds a deal
*
* @param array $data deal detials
* @return array returns detials of the deal
* @param array $data details of the deal
* @return array details of the deal
*/
public function add(array $data)
{
Expand All @@ -95,16 +95,16 @@ public function add(array $data)
/**
* Adds a product to a deal
*
* @param int $dealId deal id
* @param array $data deal and product detials
* @return array returns detials of the deal-product
* @param int $dealId ID of the deal
* @param array $data deal and product details
* @return array details of the deal-product
* @throws PipedriveMissingFieldError
*/
public function addProduct($dealId, array $data)
{
//if there is no product_id set throw error as it is a required field
if (!isset($data['product_id'])) {
throw new PipedriveMissingFieldError('You must include a "pdoruct_id" field when adding a product to a deal');
throw new PipedriveMissingFieldError('You must include a "product_id" field when adding a product to a deal');
}
//if there is no item_price set throw error as it is a required field
if (!isset($data['item_price'])) {
Expand All @@ -121,9 +121,9 @@ public function addProduct($dealId, array $data)
/**
* Updates a deal
*
* @param int $dealId pipedrives deal Id
* @param array $data new detials of deal
* @return array returns detials of a deal
* @param int $dealId ID of the deal
* @param array $data new details of the deal
* @return array details of the deal
*/
public function update($dealId, array $data = array())
{
Expand All @@ -133,9 +133,9 @@ public function update($dealId, array $data = array())
/**
* Moves deal to a new stage
*
* @param int $dealId deal id
* @param int $stageId stage id
* @return array returns detials of the deal
* @param int $dealId ID of the deal
* @param int $stageId ID of the stage
* @return array details of the deal
*/
public function moveStage($dealId, $stageId)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Benhawker/Pipedrive/Library/Notes.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public function __construct(\Benhawker\Pipedrive\Pipedrive $master)
/**
* Adds a note
*
* @param array $data note detials
* @return array returns detials of the note
* @param array $data details of the note
* @return array details of the note
*/
public function add(array $data)
{
Expand Down
40 changes: 20 additions & 20 deletions src/Benhawker/Pipedrive/Library/Organizations.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,22 @@ public function __construct(\Benhawker\Pipedrive\Pipedrive $master)
}

/**
* Returns a organization
* Returns an organization
*
* @param int $id pipedrive organizations id
* @return array returns detials of a organization
* @param int $organizationId ID of the organization
* @return array details of the organization
*/
public function getById($id)
public function getById($organizationId)
{
return $this->curl->get('organizations/' . $id);
return $this->curl->get('organizations/' . $organizationId);
}

/**
* Returns an organization
* Find organizations by name
*
* @param string $name pipedrive organizations name
* @param string $name search term to look for
* @param array $data (start, limit)
* @return array returns detials of a organization
* @return array found organizations
*/
public function getByName($name, array $data = array())
{
Expand All @@ -56,18 +56,18 @@ public function getByName($name, array $data = array())
* Returns all organizations
*
* @param array $data (filter_id, start, limit, sort_by, sort_mode)
* @return array returns detials of all organizations
* @return array all organizations
*/
public function getAll(array $data = array())
{
return $this->curl->get('organizations/', $data);
}

/**
* Lists deals associated with a organization.
* Lists deals associated with an organization.
*
* @param array $data (id, start, limit)
* @return array deals
* @return array associated deals
*/
public function deals(array $data)
{
Expand All @@ -81,26 +81,26 @@ public function deals(array $data)
/**
* Updates an organization
*
* @param int $organizationId pipedrives organization Id
* @param array $data new detials of organization
* @return array returns detials of a organization
* @param int $organizationId ID of the organization
* @param array $data new details for the organization
* @return array details of the organization
*/
public function update($organizationId, array $data = array())
{
return $this->curl->put('organizations/' . $organizationId, $data);
}

/**
* Adds a organization
* Adds a new organization
*
* @param array $data organizations detials
* @return array returns detials of a organization
* @param array $data details of the organization
* @return array details of the organization
*/
public function add(array $data)
{
//if there is no name set throw error as it is a required field
if (!isset($data['name'])) {
throw new PipedriveMissingFieldError('You must include a "name" field when inserting a organization');
throw new PipedriveMissingFieldError('You must include a "name" field when inserting an organization');
}

return $this->curl->post('organizations', $data);
Expand All @@ -109,8 +109,8 @@ public function add(array $data)
/**
* Deletes an organization
*
* @param int $organizationId pipedrives organization Id
* @return array returns detials of a organization
* @param int $organizationId ID of the organization
* @return array details of the organization
*/
public function delete($organizationId)
{
Expand Down
Loading