Skip to content

Commit 1c7719d

Browse files
Merge pull request #76 from pipedrive/GRAL-3222
GRAL-3222 - busyFlag is not supported for adding/updating activity
2 parents 54a216b + 8346485 commit 1c7719d

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ function addAnActivity($options)
422422
|-----------|------|-------------|
423423
| subject | ``` Required ``` | Subject of the activity |
424424
| type | ``` Required ``` | Type of the activity. This is in correlation with the key_string parameter of ActivityTypes. |
425-
| done | ``` Optional ``` | TODO: Add a parameter description |
425+
| done | ``` Optional ``` | Whether the activity is done or not. 0 = Not done, 1 = Done |
426426
| dueDate | ``` Optional ``` | Due date of the activity. Format: YYYY-MM-DD |
427427
| dueTime | ``` Optional ``` | Due time of the activity in UTC. Format: HH:MM |
428428
| duration | ``` Optional ``` | Duration of the activity. Format: HH:MM |
@@ -432,6 +432,7 @@ function addAnActivity($options)
432432
| participants | ``` Optional ``` | List of multiple persons (participants) this activity will be associated with. If omitted, single participant from person_id field is used. It requires a structure as follows: [{"person_id":1,"primary_flag":true}] |
433433
| orgId | ``` Optional ``` | ID of the organization this activity will be associated with |
434434
| note | ``` Optional ``` | Note of the activity (HTML format) |
435+
| busyFlag | ``` Optional ``` | Set the activity as 'Busy' or 'Free'. If the flag is set to true, your customers will not be able to book that time slot through any Scheduler links. The flag can also be unset by never setting it or overriding it with null. When the value of the flag is unset (null), the flag defaults to 'Busy' if it has a time set, and 'Free' if it is an all-day event without specified time. Format: true/false |
435436

436437

437438

@@ -474,6 +475,8 @@ $collect['orgId'] = $orgId;
474475
$note = 'note';
475476
$collect['note'] = $note;
476477

478+
$busyFlag = true;
479+
$collect['busyFlag'] = $busyFlag;
477480

478481
$activities->addAnActivity($collect);
479482

@@ -560,6 +563,7 @@ function updateEditAnActivity($options)
560563
| participants | ``` Optional ``` | List of multiple persons (participants) this activity will be associated with. If omitted, single participant from person_id field is used. It requires a structure as follows: [{"person_id":1,"primary_flag":true}] |
561564
| orgId | ``` Optional ``` | ID of the organization this activity will be associated with |
562565
| note | ``` Optional ``` | Note of the activity (HTML format) |
566+
| busyFlag | ``` Optional ``` | Set the activity as 'Busy' or 'Free'. If the flag is set to true, your customers will not be able to book that time slot through any Scheduler links. The flag can also be unset by never setting it or overriding it with null. When the value of the flag is unset (null), the flag defaults to 'Busy' if it has a time set, and 'Free' if it is an all-day event without specified time. Format: true/false |
563567

564568

565569

src/Controllers/ActivitiesController.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,16 +225,17 @@ public function addAnActivity(
225225
$_parameters = array (
226226
'subject' => $this->val($options, 'subject'),
227227
'type' => $this->val($options, 'type'),
228-
'done' => APIHelper::prepareFormFields($this->val($options, 'done')),
229-
'due_date' => DateTimeHelper::toSimpleDate($this->val($options, 'dueDate')),
228+
'done' => APIHelper::prepareFormFields($this->val($options, 'done')),
229+
'due_date' => DateTimeHelper::toSimpleDate($this->val($options, 'dueDate')),
230230
'due_time' => $this->val($options, 'dueTime'),
231231
'duration' => $this->val($options, 'duration'),
232232
'user_id' => $this->val($options, 'userId'),
233233
'deal_id' => $this->val($options, 'dealId'),
234234
'person_id' => $this->val($options, 'personId'),
235235
'participants' => $this->val($options, 'participants'),
236236
'org_id' => $this->val($options, 'orgId'),
237-
'note' => $this->val($options, 'note')
237+
'note' => $this->val($options, 'note'),
238+
'busy_flag' => $this->val($options, 'busyFlag')
238239
);
239240

240241
//call on-before Http callback
@@ -431,7 +432,8 @@ public function updateEditAnActivity(
431432
'person_id' => $this->val($options, 'personId'),
432433
'participants' => $this->val($options, 'participants'),
433434
'org_id' => $this->val($options, 'orgId'),
434-
'note' => $this->val($options, 'note')
435+
'note' => $this->val($options, 'note'),
436+
'busy_flag' => $this->val($options, 'busyFlag')
435437
);
436438

437439
//call on-before Http callback

0 commit comments

Comments
 (0)