Module: Appointments
- Included in:
- Config
- Defined in:
- lib/user/config/appointments.rb,
lib/contact/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 to an appointment.
Parameters
- data
-
(Hash) – Data to be submitted.
Example
data = {
appointment_id: 1,
follower_ids: 1
}
@data = @mints_contact.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 to an appointment.
Parameters
- data
-
(Hash) – Data to be submitted.
Example
data = {
appointment_id: 1,
invitee_ids: 1
}
@data = @mints_contact.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_model: 'products',
object_id: 1,
title: 'New Appointment',
start: '2021-11-25T14:15:00+00:00',
end: '2022-01-01T13:00:00+00:00'
}
@data = @mints_contact.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 from an appointment.
Parameters
- data
-
(Hash) – Data to be submitted.
Example
data = {
appointment_id: 1,
follower_ids: 1
}
@data = @mints_contact.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 from an appointment.
Parameters
- data
-
(Hash) – Data to be submitted.
Example
data = {
appointment_id: 1,
invitee_ids: 1
}
@data = @mints_contact.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
- options
-
(Hash) – List of Resource Collection Options shown above can be used as parameter.
First Example
@data = @mints_contact.get_appointment(1)
Second Example
= {
fields: 'id, created_at'
}
@data = @mints_contact.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_contact.get_appointments
Second Example
= {
fields: 'id, created_at'
}
@data = @mints_contact.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.
Get a collection of appointments filtering by object_type, object_id and dates range.
Parameters
- data
-
(Hash) – Data to be submitted.
Example
data = {
object_model: 'products',
object_id: 2,
start: '2021-11-25T14:15:00+00:00',
end: '2022-01-01T13:00:00+00:00'
}
@data = @mints_contact.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 a follower from an appointment.
Parameters
- data
-
(Hash) – Data to be submitted.
Example
data = {
appointment_id: 1,
follower_ids: 1
}
@data = @mints_contact.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 an invitee from an appointment.
Parameters
- data
-
(Hash) – Data to be submitted.
Example
data = {
appointment_id: 1,
invitee_ids: 1
}
@data = @mints_contact.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_contact.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 |