AppointmentService
public protocol AppointmentService
The AppointmentService provides access to a list of scheduled appointments with the logged in user, as well as functions to create appointments
-
An asynchronous call to fetch a list of the patients retail visits that have been scheduled.
Internally, this will filter the appointment based on status=requested
Declaration
Swift
func getRetailVisits(success: @escaping ([ScheduledVisit]) -> Void, failure: @escaping (FailedReason) -> Void)Parameters
successA closure called when the call succeeds. A possibly empty array of
ScheduledVisitobjects is passed to the closure.failureA closure called when the call fails.
-
Returns a list of CancellationReason objects that will be used in
cancelRetailAppointmentcallDeclaration
Swift
func getCancelReasons(brandName: String, success: @escaping ([CancelReason]) -> Void, failure: @escaping (FailedReason) -> Void)Parameters
successA closure called with a list of
CancelReasonobjectsfailureA closure called if any FailedReason errors are returned
-
Cancels an appointment
Declaration
Swift
func cancelRetailAppointment(visitId: String, cancelReason: CancelReason, success: @escaping () -> Void, failure: @escaping (FailedReason) -> Void)Parameters
visitIdThe visit id of the
ScheduledVisitto be cancelledcancelReasonReason for cancellation selected from the
CancelReasonobjects returned fromgetCancelReasons(brandName:success:failure:)successA closure called if the appointment is successfully cancelled
failureA closure called if any FailedReason errors are returned
View on GitHub
Install in Dash
AppointmentService Protocol Reference