CreateConversationDTO
in package
Class CreateConversationDTO
Data Transfer Object for creating new conversations. This DTO does not extend AbstractBaseDto because Conversations API requires multipart format which differs from other Canvas APIs.
Table of Contents
Properties
- $attachmentIds : array<string|int, int>|null
- An array of attachment IDs. These must be files previously uploaded to the sender's "conversation attachments" folder
- $body : string
- The message body to be sent
- $bulkMessage : bool|null
- Whether to send as a bulk message to each recipient
- $contextCode : string|null
- The course or group that is the context for this conversation
- $filter : array<string|int, string>|null
- Used when generating "visible" in the API response
- $filterMode : string|null
- Used when generating "visible" in the API response
- $forceNew : bool|null
- Forces a new message to be created, even if there is an existing private conversation
- $groupConversation : bool|null
- When false, individual private conversations will be created with each recipient.
- $mediaCommentId : string|null
- Media comment id of an audio or video file
- $mediaCommentType : string|null
- Type of the associated media file
- $mode : string|null
- Determines whether messages will be created/sent synchronously or asynchronously
- $recipients : array<string|int, string>
- An array of recipient ids. These may be user ids or course/group ids prefixed with "course_" or "group_" respectively
- $scope : string|null
- Used when generating "visible" in the API response
- $subject : string|null
- The subject of the conversation (max 255 characters)
Methods
- __construct() : mixed
- Constructor
- toApiArray() : array<int, array<string, string>>
- Convert the DTO to Canvas API multipart format
Properties
$attachmentIds
An array of attachment IDs. These must be files previously uploaded to the sender's "conversation attachments" folder
public
array<string|int, int>|null
$attachmentIds
= null
$body
The message body to be sent
public
string
$body
$bulkMessage
Whether to send as a bulk message to each recipient
public
bool|null
$bulkMessage
= null
$contextCode
The course or group that is the context for this conversation
public
string|null
$contextCode
= null
$filter
Used when generating "visible" in the API response
public
array<string|int, string>|null
$filter
= null
$filterMode
Used when generating "visible" in the API response
public
string|null
$filterMode
= null
$forceNew
Forces a new message to be created, even if there is an existing private conversation
public
bool|null
$forceNew
= null
$groupConversation
When false, individual private conversations will be created with each recipient.
public
bool|null
$groupConversation
= null
If true, this will be a group conversation
$mediaCommentId
Media comment id of an audio or video file
public
string|null
$mediaCommentId
= null
$mediaCommentType
Type of the associated media file
public
string|null
$mediaCommentType
= null
$mode
Determines whether messages will be created/sent synchronously or asynchronously
public
string|null
$mode
= null
$recipients
An array of recipient ids. These may be user ids or course/group ids prefixed with "course_" or "group_" respectively
public
array<string|int, string>
$recipients
$scope
Used when generating "visible" in the API response
public
string|null
$scope
= null
$subject
The subject of the conversation (max 255 characters)
public
string|null
$subject
= null
Methods
__construct()
Constructor
public
__construct([array<string, mixed> $data = [] ]) : mixed
Parameters
- $data : array<string, mixed> = []
toApiArray()
Convert the DTO to Canvas API multipart format
public
toApiArray() : array<int, array<string, string>>