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"
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]
### Added
- Added `website`, `linkedin`, `industry`, `annual_revenue`, and `employee_count` fields to v2 organization response schema (`GET /api/v2/organizations`, `GET /api/v2/organizations/{id}`) — all nullable, not included by default
- Added `deal_id`, `person_id`, and `org_id` as optional query filter parameters to `GET /api/v2/projects`
### Fixed
- Fixed `BillingStartDate` format from non-standard `'YYYY-MM-DD'` to correct OAS3 `date` format in both v1 and v2 deal product schemas
### 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
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
8 changes: 4 additions & 4 deletions lib/versions/v1/Api/FilesApi.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* FilesApi
* PHP version 7.3
* PHP version 8.0
*
* @category Class
* @package Pipedrive\versions\v1
Expand Down Expand Up @@ -83,9 +83,9 @@ class FilesApi
* @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/FiltersApi.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* FiltersApi
* PHP version 7.3
* PHP version 8.0
*
* @category Class
* @package Pipedrive\versions\v1
Expand Down Expand Up @@ -83,9 +83,9 @@ class FiltersApi
* @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/GoalsApi.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* GoalsApi
* PHP version 7.3
* PHP version 8.0
*
* @category Class
* @package Pipedrive\versions\v1
Expand Down Expand Up @@ -83,9 +83,9 @@ class GoalsApi
* @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/LeadFieldsApi.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* LeadFieldsApi
* PHP version 7.3
* PHP version 8.0
*
* @category Class
* @package Pipedrive\versions\v1
Expand Down Expand Up @@ -83,9 +83,9 @@ class LeadFieldsApi
* @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