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)
156 157 158 |
# File 'lib/user/config/appointments.rb', line 156 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)
140 141 142 |
# File 'lib/user/config/appointments.rb', line 140 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)
61 62 63 |
# File 'lib/user/config/appointments.rb', line 61 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)
89 90 91 |
# File 'lib/user/config/appointments.rb', line 89 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)
188 189 190 |
# File 'lib/user/config/appointments.rb', line 188 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)
172 173 174 |
# File 'lib/user/config/appointments.rb', line 172 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, )
41 42 43 |
# File 'lib/user/config/appointments.rb', line 41 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()
22 23 24 |
# File 'lib/user/config/appointments.rb', line 22 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)
124 125 126 |
# File 'lib/user/config/appointments.rb', line 124 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)
107 108 109 |
# File 'lib/user/config/appointments.rb', line 107 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)
220 221 222 |
# File 'lib/user/config/appointments.rb', line 220 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)
204 205 206 |
# File 'lib/user/config/appointments.rb', line 204 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)
77 78 79 |
# File 'lib/user/config/appointments.rb', line 77 def update_appointment(id, data) @client.raw('put', "/config/appointments/#{id}", nil, data_transform(data)) end |