Skip to content

Commit 331ddf6

Browse files
committed
Merge branch 'master' into GRAL-2200-person-optional-fields
2 parents 76eb14c + 8b9b83e commit 331ddf6

File tree

4 files changed

+559
-1
lines changed

4 files changed

+559
-1
lines changed

README.md

Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ You can change the PHPUnit test configuration in the `phpunit.xml` file.
281281
* [ActivitiesController](#activities_controller)
282282
* [ActivityFieldsController](#activity_fields_controller)
283283
* [ActivityTypesController](#activity_types_controller)
284+
* [CallLogsController](#call_logs_controller)
284285
* [CurrenciesController](#currencies_controller)
285286
* [DealFieldsController](#deal_fields_controller)
286287
* [DealsController](#deals_controller)
@@ -806,6 +807,193 @@ $activityTypes->updateEditActivityType($collect);
806807
```
807808

808809

810+
[Back to List of Controllers](#list_of_controllers)
811+
812+
## <a name="call_logs_controller"></a>![Class: ](https://apidocs.io/img/class.png ".CallLogsController") CallLogsController
813+
814+
### Get singleton instance
815+
816+
The singleton instance of the ``` CallLogsController ``` class can be accessed from the API Client.
817+
818+
```php
819+
$callLogs = $client->getCallLogs();
820+
```
821+
822+
### <a name="get_all_call_logs_assigned_to_a_particular_user"></a>![Method: ](https://apidocs.io/img/method.png ".CallLogsController.getAllCallLogsAssignedToAParticularUser") getAllCallLogsAssignedToAParticularUser
823+
824+
> Returns all call logs assigned to a particular user
825+
826+
827+
```php
828+
function getAllCallLogsAssignedToAParticularUser($options)
829+
```
830+
831+
#### Parameters
832+
833+
| Parameter | Tags | Description |
834+
|-----------|------|-------------|
835+
| start | ``` Optional ``` | For pagination, the position that represents the first result for the page |
836+
| limit | ``` Optional ``` | For pagination, the limit of entries to be returned |
837+
838+
#### Example Usage
839+
840+
```php
841+
$start = 0;
842+
$options['start'] = $start;
843+
844+
$limit = 119;
845+
$options['limit'] = $limit;
846+
847+
$callLogs->getAllCallLogsAssignedToAParticularUser($options);
848+
849+
```
850+
851+
### <a name="get_details_of_a_call_log"></a>![Method: ](https://apidocs.io/img/method.png ".CallLogsController.getDetailsOfACallLog") getDetailsOfACallLog
852+
853+
> Returns details of a specific call log
854+
855+
856+
```php
857+
function getDetailsOfACallLog($id)
858+
```
859+
860+
#### Parameters
861+
862+
| Parameter | Tags | Description |
863+
|-----------|------|-------------|
864+
| id | ``` Required ``` | ID of the field |
865+
866+
#### Example Usage
867+
868+
```php
869+
$id = 1;
870+
871+
$callLogs->getDetailsOfACallLog($id);
872+
873+
```
874+
875+
### <a name="add_a_call_log"></a>![Method: ](https://apidocs.io/img/method.png ".CallLogsController.addACallLog") addACallLog
876+
877+
> Adds a new call log
878+
879+
880+
```php
881+
function addACallLog($collect)
882+
```
883+
884+
#### Parameters
885+
886+
| Parameter | Tags | Description |
887+
|-----------|------|-------------|
888+
| user_id | ```optional``` | The ID of the owner of the call log |
889+
| activity_id | ```optional``` | If specified, this activity will be converted into a call log, with the information provided. When this field is used, you don't need to specify deal_id, person_id or org_id, as they will be ignored in favor of the values already available in the activity. |
890+
| subject| ```optional``` | Name of the activity this call is attached to |
891+
| duration| ```optional``` | Call duration in seconds |
892+
| outcome| ```required``` | Describes the outcome of the call |
893+
| from_phone_number| ```optional``` | The number that made the call |
894+
| to_phone_number| ```required``` | The number called |
895+
| start_time| ```required``` | The date and time of the start of the call in UTC. Format: YYYY-MM-DD HH:MM:SS. |
896+
| end_time | ```required``` | The date and time of the end of the call in UTC. Format: YYYY-MM-DD HH:MM:SS. |
897+
| person_id | ```optional``` | The ID of the Person this call is associated with |
898+
| org_id | ```optional``` | The ID of the Organization this call is associated with |
899+
| deal_id | ```optional``` | The ID of the Deal this call is associated with |
900+
901+
#### Example Usage
902+
903+
```php
904+
905+
$subject = 'subject';
906+
$collect['subject'] = $subject;
907+
908+
$duration = 60;
909+
$collect['duration'] = $duration;
910+
911+
$outcome = 'connected'
912+
$collect['outcome'] = $connected;
913+
914+
$fromPhoneNumber = '+55 555 5555';
915+
$collect['from_phone_number'] = $fromPhoneNumber;
916+
917+
$fromPhoneNumber = '+55 555 5556';
918+
$collect['to_phone_number'] = $fromPhoneNumber;
919+
920+
$startTime = '2021-01-30 22:30:00';
921+
$collect['start_time'] = $startTime;
922+
923+
$endTime = '2021-01-30 22:31:00';
924+
$collect['end_time'] = $endTime;
925+
926+
$personId = 1;
927+
$collect['person_id'] = $personId;
928+
929+
$orgId = 1;
930+
$collect['org_id'] = $orgId;
931+
932+
$dealId = 1;
933+
$collect['deal_id'] = $dealId;
934+
935+
$note = 'note';
936+
$collect['note'] = $note;
937+
938+
$callLogs->addACallLog($collect);
939+
940+
```
941+
942+
### <a name="attach_an_audio_file_to_the_call_log"></a>![Method: ](https://apidocs.io/img/method.png ".CallLogsController.attachAnAudioFileToTheCallLog") attachAnAudioFileToTheCallLog
943+
944+
> Adds an audio recording to the call log. That audio can be played by those who have access to the call log object.
945+
946+
947+
```php
948+
function attachAnAudioFileToTheCallLog($id, $collect)
949+
```
950+
951+
#### Parameters
952+
953+
| Parameter | Tags | Description |
954+
|-----------|------|-------------|
955+
| id | ```required``` | The ID received when you create the call log |
956+
| file | ```required``` | Audio file supported by the HTML5 specification |
957+
| mime_type | ```required``` | The mime type of the file, according to html5 standards (eg.: audio/wave for a .wav file )|
958+
959+
#### Example Usage
960+
961+
```php
962+
963+
$id = 'id';
964+
965+
$file = "PathToFile";
966+
$collect['file'] = $file;
967+
968+
$callLogs->attachAnAudioFileToTheCallLog($id, $collect);
969+
970+
```
971+
972+
### <a name="delete_a_call_log"></a>![Method: ](https://apidocs.io/img/method.png ".CallLogsController.deleteACallLog") deleteACallLog
973+
974+
> Deletes a call log. If there is an audio recording attached to it, it will also be deleted. The related activity will not be removed by this request. If you want to remove the related activities, please use the endpoint which is specific for activities.
975+
976+
977+
```php
978+
function deleteACallLog($id)
979+
```
980+
981+
#### Parameters
982+
983+
| Parameter | Tags | Description |
984+
|-----------|------|-------------|
985+
| id | ```required``` | ID of the callLog |
986+
987+
#### Example Usage
988+
989+
```php
990+
991+
$id = 'id';
992+
993+
$callLogs->deleteACallLog($id);
994+
995+
```
996+
809997
[Back to List of Controllers](#list_of_controllers)
810998

811999
## <a name="currencies_controller"></a>![Class: ](https://apidocs.io/img/class.png ".CurrenciesController") CurrenciesController

src/Client.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ public function getActivityTypes()
5353
{
5454
return Controllers\ActivityTypesController::getInstance();
5555
}
56+
/**
57+
* Singleton access to CallLogs controller
58+
* @return Controllers\CallLogsController The *Singleton* instance
59+
*/
60+
public function getCallLogs()
61+
{
62+
return Controllers\CallLogsController::getInstance();
63+
}
5664
/**
5765
* Singleton access to Currencies controller
5866
* @return Controllers\CurrenciesController The *Singleton* instance

src/Controllers/BaseController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class BaseController
2424
* User-agent to be sent with API calls
2525
* @var string
2626
*/
27-
const USER_AGENT = 'Pipedrive-SDK-PHP-3.0.1';
27+
const USER_AGENT = 'Pipedrive-SDK-PHP-3.2.0';
2828

2929
/**
3030
* HttpCallBack instance associated with this controller

0 commit comments

Comments
 (0)