This repository has been archived by the owner on Sep 15, 2022. It is now read-only.
forked from zoom-lib-golang/zoom-lib-golang
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeeting_update_registrant.go
46 lines (37 loc) · 1.76 KB
/
meeting_update_registrant.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package zoom
import "fmt"
const (
// UpdateRegistrantsStatusPath defines a path for updating status of meeting registrants
UpdateRegistrantsStatusPath = "/meetings/%d/registrants/status"
// MeetingRegistrantStatusActionApprove defines the action to approve the registrant of the meeting
MeetingRegistrantStatusActionApprove MeetingRegistrantStatusActionType = "approve"
// MeetingRegistrantStatusActionCancel defines the action to cancel the registrant of the meeting
MeetingRegistrantStatusActionCancel MeetingRegistrantStatusActionType = "cancel"
// MeetingRegistrantStatusActionDeny defines the action to deny the registrant of the meeting
MeetingRegistrantStatusActionDeny MeetingRegistrantStatusActionType = "deny"
)
type (
// MeetingRegistrantStatusActionType defines the type of actions on the registrant status
MeetingRegistrantStatusActionType string
// MeetingRegistrantDetails contains identification of the meeting registrant
MeetingRegistrantDetails struct {
ID string `json:"id"`
Email string `json:"email"`
}
// MeetingRegistrantsStatus contains options for updating status
MeetingRegistrantsStatus struct {
MeetingID int `json:"-" url:"-"`
OccurrenceIDs string `json:"-" url:"occurrence_id,omitempty"`
Action MeetingRegistrantStatusActionType `json:"action" url:"-"`
Registrants []MeetingRegistrantDetails `json:"registrants" url:"-"`
}
)
// UpdateRegistrantsStatus updates a status of meeting registrants
func (c *Client) UpdateRegistrantsStatus(opts MeetingRegistrantsStatus) error {
return c.requestV2(requestV2Opts{
Method: Put,
Path: fmt.Sprintf(UpdateRegistrantsStatusPath, opts.MeetingID),
URLParameters: opts,
DataParameters: opts,
})
}