Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 4 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
language: php
# Bionic environment has preinstalled PHP from 7.1 to 7.4
# https://docs.travis-ci.com/user/reference/bionic/#php-support
dist: bionic
dist: focal
php:
- 7.3
- 7.4
- 8.1
- 8.2
before_install: "composer install"
script: "vendor/bin/phpunit"
script: "vendor/bin/pest"
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]
### Added
- Added `project_id` parameter to `POST /v1/files` endpoint
- Added `project_id` & `project_name` properties to responses in `/v1/files/*` endpoints
### Added
- Added projects v2 API
- Added project boards v2 API
- Added project phases v2 API
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This SDK supports two API versions, each with its own namespace and documentatio

### Requirements

PHP 7.4+ and later.
PHP 8.0+ and later.

### Composer

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"homepage": "https://github.com/pipedrive/client-php",
"license": "MIT",
"require": {
"php": "^7.4 || ^8.0",
"php": "^8.0",
"ext-curl": "*",
"ext-json": "*",
"ext-mbstring": "*",
Expand Down
6 changes: 4 additions & 2 deletions docs/versions/v1/Api/FilesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Method | HTTP request | Description
## `addFile()`

```php
addFile($file, $deal_id, $person_id, $org_id, $product_id, $activity_id, $lead_id): \Pipedrive\versions\v1\Model\AddFile
addFile($file, $deal_id, $person_id, $org_id, $product_id, $activity_id, $lead_id, $project_id): \Pipedrive\versions\v1\Model\AddFile
```

Add file
Expand Down Expand Up @@ -53,9 +53,10 @@ $org_id = 56; // int | The ID of the organization to associate file(s) with
$product_id = 56; // int | The ID of the product to associate file(s) with
$activity_id = 56; // int | The ID of the activity to associate file(s) with
$lead_id = 'lead_id_example'; // string | The ID of the lead to associate file(s) with
$project_id = 56; // int | The ID of the project to associate file(s) with

try {
$result = $apiInstance->addFile($file, $deal_id, $person_id, $org_id, $product_id, $activity_id, $lead_id);
$result = $apiInstance->addFile($file, $deal_id, $person_id, $org_id, $product_id, $activity_id, $lead_id, $project_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FilesApi->addFile: ', $e->getMessage(), PHP_EOL;
Expand All @@ -73,6 +74,7 @@ Name | Type | Description | Notes
**product_id** | **int**| The ID of the product to associate file(s) with | [optional]
**activity_id** | **int**| The ID of the activity to associate file(s) with | [optional]
**lead_id** | **string**| The ID of the lead to associate file(s) with | [optional]
**project_id** | **int**| The ID of the project to associate file(s) with | [optional]

### Return type

Expand Down
2 changes: 2 additions & 0 deletions docs/versions/v1/Model/FileData.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Name | Type | Description | Notes
**product_id** | **int** | The ID of the product to associate the file with | [optional]
**activity_id** | **int** | The ID of the activity to associate the file with | [optional]
**lead_id** | **string** | The ID of the lead to associate the file with | [optional]
**project_id** | **int** | The ID of the project to associate the file with | [optional]
**add_time** | **string** | The date and time when the file was added/created. Format: YYYY-MM-DD HH:MM:SS | [optional]
**update_time** | **string** | The last updated date and time of the file. Format: YYYY-MM-DD HH:MM:SS | [optional]
**file_name** | **string** | The original name of the file | [optional]
Expand All @@ -29,6 +30,7 @@ Name | Type | Description | Notes
**org_name** | **string** | The name of the organization associated with the file | [optional]
**product_name** | **string** | The name of the product associated with the file | [optional]
**lead_name** | **string** | The name of the lead associated with the file | [optional]
**project_name** | **string** | The name of the project associated with the file | [optional]
**url** | **string** | The URL of the download file | [optional]
**name** | **string** | The visible name of the file | [optional]
**description** | **string** | The description of the file | [optional]
Expand Down
10 changes: 8 additions & 2 deletions docs/versions/v2/Api/ProjectsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ Name | Type | Description | Notes
## `getProjects()`

```php
getProjects($filter_id, $status, $phase_id, $limit, $cursor): \Pipedrive\versions\v2\Model\GetProjects
getProjects($filter_id, $status, $phase_id, $deal_id, $person_id, $org_id, $limit, $cursor): \Pipedrive\versions\v2\Model\GetProjects
```

Get all projects
Expand Down Expand Up @@ -518,11 +518,14 @@ $apiInstance = new Pipedrive\versions\v2\Api\ProjectsApi(
$filter_id = 56; // int | If supplied, only projects matching the specified filter are returned
$status = open,completed; // string | If supplied, includes only projects with the specified statuses. Possible values are `open`, `completed`, `canceled` and `deleted`. By default `deleted` projects are not returned.
$phase_id = 56; // int | If supplied, only projects in the specified phase are returned
$deal_id = 56; // int | If supplied, only projects associated with the specified deal are returned
$person_id = 56; // int | If supplied, only projects associated with the specified person are returned
$org_id = 56; // int | If supplied, only projects associated with the specified organization are returned
$limit = 100; // int | For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
$cursor = 'cursor_example'; // string | For pagination, the marker (an opaque string value) representing the first item on the next page

try {
$result = $apiInstance->getProjects($filter_id, $status, $phase_id, $limit, $cursor);
$result = $apiInstance->getProjects($filter_id, $status, $phase_id, $deal_id, $person_id, $org_id, $limit, $cursor);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProjectsApi->getProjects: ', $e->getMessage(), PHP_EOL;
Expand All @@ -536,6 +539,9 @@ Name | Type | Description | Notes
**filter_id** | **int**| If supplied, only projects matching the specified filter are returned | [optional]
**status** | **string**| If supplied, includes only projects with the specified statuses. Possible values are `open`, `completed`, `canceled` and `deleted`. By default `deleted` projects are not returned. | [optional]
**phase_id** | **int**| If supplied, only projects in the specified phase are returned | [optional]
**deal_id** | **int**| If supplied, only projects associated with the specified deal are returned | [optional]
**person_id** | **int**| If supplied, only projects associated with the specified person are returned | [optional]
**org_id** | **int**| If supplied, only projects associated with the specified organization are returned | [optional]
**limit** | **int**| For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed. | [optional]
**cursor** | **string**| For pagination, the marker (an opaque string value) representing the first item on the next page | [optional]

Expand Down
2 changes: 1 addition & 1 deletion docs/versions/v2/Model/BaseDealProduct.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ Name | Type | Description | Notes
**is_enabled** | **bool** | Whether this product is enabled for the deal | [optional] [default to true]
**billing_frequency** | [**\Pipedrive\versions\v2\Model\BillingFrequency**](BillingFrequency.md) | | [optional]
**billing_frequency_cycles** | **int** | Only available in Growth and above plans The number of times the billing frequency repeats for a product in a deal When `billing_frequency` is set to `one-time`, this field must be `null` When `billing_frequency` is set to `weekly`, this field cannot be `null` For all the other values of `billing_frequency`, `null` represents a product billed indefinitely Must be a positive integer less or equal to 208 | [optional]
**billing_start_date** | **string** | Only available in Growth and above plans The billing start date. Must be between 10 years in the past and 10 years in the future | [optional]
**billing_start_date** | **\DateTime** | Only available in Growth and above plans The billing start date. Must be between 10 years in the past and 10 years in the future | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
2 changes: 1 addition & 1 deletion docs/versions/v2/Model/BaseDealProductAllOf3.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**billing_start_date** | **string** | Only available in Growth and above plans The billing start date. Must be between 10 years in the past and 10 years in the future | [optional]
**billing_start_date** | **\DateTime** | Only available in Growth and above plans The billing start date. Must be between 10 years in the past and 10 years in the future | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
2 changes: 1 addition & 1 deletion docs/versions/v2/Model/NewDealProductRequestBody.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ Name | Type | Description | Notes
**product_variation_id** | **int** | The ID of the product variation | [optional]
**billing_frequency** | [**\Pipedrive\versions\v2\Model\BillingFrequency**](BillingFrequency.md) | | [optional]
**billing_frequency_cycles** | **int** | Only available in Growth and above plans The number of times the billing frequency repeats for a product in a deal When `billing_frequency` is set to `one-time`, this field must be `null` When `billing_frequency` is set to `weekly`, this field cannot be `null` For all the other values of `billing_frequency`, `null` represents a product billed indefinitely Must be a positive integer less or equal to 208 | [optional]
**billing_start_date** | **string** | Only available in Growth and above plans The billing start date. Must be between 10 years in the past and 10 years in the future | [optional]
**billing_start_date** | **\DateTime** | Only available in Growth and above plans The billing start date. Must be between 10 years in the past and 10 years in the future | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
5 changes: 5 additions & 0 deletions docs/versions/v2/Model/OrganizationItem.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ Name | Type | Description | Notes
**visible_to** | **int** | The visibility of the organization | [optional]
**address** | [**\Pipedrive\versions\v2\Model\OrganizationItemAddress**](OrganizationItemAddress.md) | | [optional]
**label_ids** | **int[]** | The IDs of labels assigned to the organization | [optional]
**website** | **string** | The website of the organization | [optional]
**linkedin** | **string** | The LinkedIn profile URL of the organization | [optional]
**industry** | **int** | The industry the organization belongs to | [optional]
**annual_revenue** | **int** | The annual revenue of the organization | [optional]
**employee_count** | **int** | The number of employees in the organization | [optional]
**custom_fields** | **array<string,object>** | An object where each key represents a custom field. All custom fields are referenced as randomly generated 40-character hashes. To clear a custom field value, set it to &#x60;null&#x60;. For multi-option fields (field type &#x60;set&#x60;), use &#x60;null&#x60; to clear the selection — sending an empty array &#x60;[]&#x60; is not supported and will result in a validation error. | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
2 changes: 1 addition & 1 deletion docs/versions/v2/Model/UpdateDealProductRequestBody.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ Name | Type | Description | Notes
**product_variation_id** | **int** | The ID of the product variation | [optional]
**billing_frequency** | [**\Pipedrive\versions\v2\Model\BillingFrequency**](BillingFrequency.md) | | [optional]
**billing_frequency_cycles** | **int** | Only available in Growth and above plans The number of times the billing frequency repeats for a product in a deal When &#x60;billing_frequency&#x60; is set to &#x60;one-time&#x60;, this field must be &#x60;null&#x60; When &#x60;billing_frequency&#x60; is set to &#x60;weekly&#x60;, this field cannot be &#x60;null&#x60; For all the other values of &#x60;billing_frequency&#x60;, &#x60;null&#x60; represents a product billed indefinitely Must be a positive integer less or equal to 208 | [optional]
**billing_start_date** | **string** | Only available in Growth and above plans The billing start date. Must be between 10 years in the past and 10 years in the future | [optional]
**billing_start_date** | **\DateTime** | Only available in Growth and above plans The billing start date. Must be between 10 years in the past and 10 years in the future | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
8 changes: 4 additions & 4 deletions lib/versions/v1/Api/ActivityFieldsApi.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* ActivityFieldsApi
* PHP version 7.3
* PHP version 8.0
*
* @category Class
* @package Pipedrive\versions\v1
Expand Down Expand Up @@ -83,9 +83,9 @@ class ActivityFieldsApi
* @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec
*/
public function __construct(
ClientInterface $client = null,
Configuration $config = null,
HeaderSelector $selector = null,
?ClientInterface $client = null,
?Configuration $config = null,
?HeaderSelector $selector = null,
int $hostIndex = 0
) {
$this->client = $client ?: new Client();
Expand Down
8 changes: 4 additions & 4 deletions lib/versions/v1/Api/ActivityTypesApi.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* ActivityTypesApi
* PHP version 7.3
* PHP version 8.0
*
* @category Class
* @package Pipedrive\versions\v1
Expand Down Expand Up @@ -83,9 +83,9 @@ class ActivityTypesApi
* @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec
*/
public function __construct(
ClientInterface $client = null,
Configuration $config = null,
HeaderSelector $selector = null,
?ClientInterface $client = null,
?Configuration $config = null,
?HeaderSelector $selector = null,
int $hostIndex = 0
) {
$this->client = $client ?: new Client();
Expand Down
8 changes: 4 additions & 4 deletions lib/versions/v1/Api/BillingApi.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* BillingApi
* PHP version 7.3
* PHP version 8.0
*
* @category Class
* @package Pipedrive\versions\v1
Expand Down Expand Up @@ -83,9 +83,9 @@ class BillingApi
* @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec
*/
public function __construct(
ClientInterface $client = null,
Configuration $config = null,
HeaderSelector $selector = null,
?ClientInterface $client = null,
?Configuration $config = null,
?HeaderSelector $selector = null,
int $hostIndex = 0
) {
$this->client = $client ?: new Client();
Expand Down
8 changes: 4 additions & 4 deletions lib/versions/v1/Api/CallLogsApi.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* CallLogsApi
* PHP version 7.3
* PHP version 8.0
*
* @category Class
* @package Pipedrive\versions\v1
Expand Down Expand Up @@ -83,9 +83,9 @@ class CallLogsApi
* @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec
*/
public function __construct(
ClientInterface $client = null,
Configuration $config = null,
HeaderSelector $selector = null,
?ClientInterface $client = null,
?Configuration $config = null,
?HeaderSelector $selector = null,
int $hostIndex = 0
) {
$this->client = $client ?: new Client();
Expand Down
8 changes: 4 additions & 4 deletions lib/versions/v1/Api/ChannelsApi.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* ChannelsApi
* PHP version 7.3
* PHP version 8.0
*
* @category Class
* @package Pipedrive\versions\v1
Expand Down Expand Up @@ -83,9 +83,9 @@ class ChannelsApi
* @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec
*/
public function __construct(
ClientInterface $client = null,
Configuration $config = null,
HeaderSelector $selector = null,
?ClientInterface $client = null,
?Configuration $config = null,
?HeaderSelector $selector = null,
int $hostIndex = 0
) {
$this->client = $client ?: new Client();
Expand Down
8 changes: 4 additions & 4 deletions lib/versions/v1/Api/CurrenciesApi.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* CurrenciesApi
* PHP version 7.3
* PHP version 8.0
*
* @category Class
* @package Pipedrive\versions\v1
Expand Down Expand Up @@ -83,9 +83,9 @@ class CurrenciesApi
* @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec
*/
public function __construct(
ClientInterface $client = null,
Configuration $config = null,
HeaderSelector $selector = null,
?ClientInterface $client = null,
?Configuration $config = null,
?HeaderSelector $selector = null,
int $hostIndex = 0
) {
$this->client = $client ?: new Client();
Expand Down
8 changes: 4 additions & 4 deletions lib/versions/v1/Api/DealFieldsApi.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* DealFieldsApi
* PHP version 7.3
* PHP version 8.0
*
* @category Class
* @package Pipedrive\versions\v1
Expand Down Expand Up @@ -83,9 +83,9 @@ class DealFieldsApi
* @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec
*/
public function __construct(
ClientInterface $client = null,
Configuration $config = null,
HeaderSelector $selector = null,
?ClientInterface $client = null,
?Configuration $config = null,
?HeaderSelector $selector = null,
int $hostIndex = 0
) {
$this->client = $client ?: new Client();
Expand Down
8 changes: 4 additions & 4 deletions lib/versions/v1/Api/DealsApi.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* DealsApi
* PHP version 7.3
* PHP version 8.0
*
* @category Class
* @package Pipedrive\versions\v1
Expand Down Expand Up @@ -83,9 +83,9 @@ class DealsApi
* @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec
*/
public function __construct(
ClientInterface $client = null,
Configuration $config = null,
HeaderSelector $selector = null,
?ClientInterface $client = null,
?Configuration $config = null,
?HeaderSelector $selector = null,
int $hostIndex = 0
) {
$this->client = $client ?: new Client();
Expand Down
Loading