Module: Appointments
- Included in:
- Config
- Defined in:
- lib/user/config/appointments.rb
Instance Method Summary collapse
-
#attach_follower(data) ⇒ Object
Attach follower.
-
#attach_invitee(data) ⇒ Object
Attach invitee.
-
#create_appointment(data) ⇒ Object
Create appointment.
-
#delete_appointment(id) ⇒ Object
Delete appointment.
-
#detach_follower(data) ⇒ Object
Detach follower.
-
#detach_invitee(data) ⇒ Object
Detach invitee.
-
#get_appointment(id, options = nil) ⇒ Object
Get appointment.
-
#get_appointments(options = nil) ⇒ Object
Get appointments.
-
#reschedule_appointment(data) ⇒ Object
Reschedule appointment.
-
#scheduled_appointments(data) ⇒ Object
Scheduled appointments.
-
#sync_follower(data) ⇒ Object
Sync follower.
-
#sync_invitee(data) ⇒ Object
Sync invitee.
-
#update_appointment(id, data) ⇒ Object
Update appointment.
Instance Method Details
#attach_follower(data) ⇒ Object
Attach follower.
Attach follower.
Parameters
- data
-
(Hash) – Data to be submitted.
Example
data = {
"appointment_id": 2,
"follower_ids": [ 2 ]
}
@data = @mints_user.attach_follower(data)
154 155 156 |
# File 'lib/user/config/appointments.rb', line 154 def attach_follower(data) @client.raw("post", "/config/appointments/attach-follower", nil, data_transform(data)) end |
#attach_invitee(data) ⇒ Object
Attach invitee.
Attach invitee.
Parameters
- data
-
(Hash) – Data to be submitted.
Example
data = {
"appointment_id": 2,
"invitee_ids": [ 2 ]
}
@data = @mints_user.attach_invitee(data)
138 139 140 |
# File 'lib/user/config/appointments.rb', line 138 def attach_invitee(data) @client.raw("post", "/config/appointments/attach-invitee", nil, data_transform(data)) end |
#create_appointment(data) ⇒ Object
Create appointment.
Create an appointment with data.
Parameters
- data
-
(Hash) – Data to be submitted.
Example
data = {
"object_type": "contacts",
"object_id": 1,
"title": "New Appointment",
"start": "2021-09-06T20:29:16+00:00",
"end": "2022-09-06T20:29:16+00:00",
"attendee_id": 1
}
@data = @mints_user.create_appointment(data)
59 60 61 |
# File 'lib/user/config/appointments.rb', line 59 def create_appointment(data) @client.raw("post", "/config/appointments", nil, data_transform(data)) end |
#delete_appointment(id) ⇒ Object
Delete appointment.
Delete an appointment.
Parameters
- id
-
(Integer) – Appointment id.
Example
@data = @mints_user.delete_appointment(1)
87 88 89 |
# File 'lib/user/config/appointments.rb', line 87 def delete_appointment(id) @client.raw("delete", "/config/appointments/#{id}") end |
#detach_follower(data) ⇒ Object
Detach follower.
Detach follower.
Parameters
- data
-
(Hash) – Data to be submitted.
Example
data = {
"appointment_id": 2,
"follower_ids": [ 2 ]
}
@data = @mints_user.detach_follower(data)
186 187 188 |
# File 'lib/user/config/appointments.rb', line 186 def detach_follower(data) @client.raw("post", "/config/appointments/detach-follower", nil, data_transform(data)) end |
#detach_invitee(data) ⇒ Object
Detach invitee.
Detach invitee.
Parameters
- data
-
(Hash) – Data to be submitted.
Example
data = {
"appointment_id": 2,
"invitee_ids": [ 2 ]
}
@data = @mints_user.detach_invitee(data)
170 171 172 |
# File 'lib/user/config/appointments.rb', line 170 def detach_invitee(data) @client.raw("post", "/config/appointments/detach-invitee", nil, data_transform(data)) end |
#get_appointment(id, options = nil) ⇒ Object
Get appointment.
Get an appointment info.
Parameters
- id
-
(Integer) – Appointment id.
- options
-
(Hash) – List of Resource Collection Options shown above can be used as parameter.
First Example
@data = @mints_user.get_appointment(1)
Second Example
= {
"fields": "id"
}
@data = @mints_user.get_appointment(1, )
39 40 41 |
# File 'lib/user/config/appointments.rb', line 39 def get_appointment(id, = nil) @client.raw("get", "/config/appointments/#{id}", ) end |
#get_appointments(options = nil) ⇒ Object
Get appointments.
Get a collection of appointments.
Parameters
- options
-
(Hash) – List of Resource Collection Options shown above can be used as parameter.
First Example
@data = @mints_user.get_appointments
Second Example
= {
"fields": "id"
}
@data = @mints_user.get_appointments()
20 21 22 |
# File 'lib/user/config/appointments.rb', line 20 def get_appointments( = nil) @client.raw("get", "/config/appointments", ) end |
#reschedule_appointment(data) ⇒ Object
Reschedule appointment.
Reschedule an appointment.
Parameters
- data
-
(Hash) – Data to be submitted.
Example
data = {
"appointment_id": 2,
"start": "2021-09-06T20:29:16+00:00",
"end": "2022-09-06T20:29:16+00:00"
}
@data = @mints_user.reschedule_appointment(data)
122 123 124 |
# File 'lib/user/config/appointments.rb', line 122 def reschedule_appointment(data) @client.raw("post", "/config/appointments/reschedule-appointment", nil, data_transform(data)) end |
#scheduled_appointments(data) ⇒ Object
Scheduled appointments.
Schedule an appointment.
Parameters
- data
-
(Hash) – Data to be submitted.
Example
data = {
"object_type": "contacts",
"object_id": 1,
"start": "2021-09-06T20:29:16+00:00",
"end": "2022-09-06T20:29:16+00:00"
}
@data = @mints_user.scheduled_appointments(data)
105 106 107 |
# File 'lib/user/config/appointments.rb', line 105 def scheduled_appointments(data) @client.raw("post", "/config/appointments/scheduled-appointments", nil, data_transform(data)) end |
#sync_follower(data) ⇒ Object
Sync follower.
Sync follower.
Parameters
- data
-
(Hash) – Data to be submitted.
Example
data = {
"appointment_id": 2,
"follower_ids": [ 2 ]
}
@data = @mints_user.sync_follower(data)
218 219 220 |
# File 'lib/user/config/appointments.rb', line 218 def sync_follower(data) @client.raw("post", "/config/appointments/sync-follower", nil, data_transform(data)) end |
#sync_invitee(data) ⇒ Object
Sync invitee.
Sync invitee.
Parameters
- data
-
(Hash) – Data to be submitted.
Example
data = {
"appointment_id": 2,
"invitee_ids": [ 2 ]
}
@data = @mints_user.sync_invitee(data)
202 203 204 |
# File 'lib/user/config/appointments.rb', line 202 def sync_invitee(data) @client.raw("post", "/config/appointments/sync-invitee", nil, data_transform(data)) end |
#update_appointment(id, data) ⇒ Object
Update appointment.
Update an appointment info.
Parameters
- id
-
(Integer) – Appointment id.
- data
-
(Hash) – Data to be submitted.
Example
data = {
"object_id": 2
}
@data = @mints_user.update_appointment(1, data)
75 76 77 |
# File 'lib/user/config/appointments.rb', line 75 def update_appointment(id, data) @client.raw("put", "/config/appointments/#{id}", nil, data_transform(data)) end |