Skip to content

Commit

Permalink
api signature
Browse files Browse the repository at this point in the history
  • Loading branch information
yparitcher committed Nov 21, 2024
1 parent 9099683 commit 188bfb5
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/RingCentral.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public function getMessageAttachmentById(string $extensionId, string $messageId,
* @throws CouldNotAuthenticate
* @throws ApiException
*/
public function getCallLogs(?object $fromDate = null, ?object $toDate = null, ?bool $withRecording = true, ?int $perPage = 100) {
public function getCallLogs(?object $fromDate = null, ?object $toDate = null, bool $withRecording = true, ?int $perPage = 100) {
$this->authenticate();

$dates = [];
Expand All @@ -223,11 +223,13 @@ public function getCallLogs(?object $fromDate = null, ?object $toDate = null, ?b
if ($toDate) {
$dates['dateTo'] = $toDate->format('c');
}
if ($withRecording) {
$dates['recordingType'] = 'All';
}

$r = $this->ringCentral->get('/account/~/call-log', array_merge(
[
'type' => 'Voice',
'withRecording' => $withRecording,
'perPage' => $perPage,
],
$dates
Expand All @@ -240,7 +242,7 @@ public function getCallLogs(?object $fromDate = null, ?object $toDate = null, ?b
* @throws CouldNotAuthenticate
* @throws ApiException
*/
public function getCallLogsForExtensionId(string $extensionId, ?object $fromDate = null, ?object $toDate = null, ?bool $withRecording = true, ?int $perPage = 100) {
public function getCallLogsForExtensionId(string $extensionId, ?object $fromDate = null, ?object $toDate = null, bool $withRecording = true, ?int $perPage = 100) {
$this->authenticate();

$dates = [];
Expand All @@ -253,10 +255,13 @@ public function getCallLogsForExtensionId(string $extensionId, ?object $fromDate
$dates['dateTo'] = $toDate->format('c');
}

if ($withRecording) {
$dates['recordingType'] = 'All';
}

$r = $this->ringCentral->get('/account/~/extension/'.$extensionId.'/call-log', array_merge(
[
'type' => 'Voice',
'withRecording' => $withRecording,
'perPage' => $perPage,
],
$dates
Expand Down

0 comments on commit 188bfb5

Please sign in to comment.