コード例 #1
0
 public IndividualAppointmentResponse UpdateAppointment(Appointment appointment)
 {
     var body = appointment ;
     IndividualAppointmentResponse individualAppointmentResponse = new IndividualAppointmentResponse();
     Appointment retAppointment = GenericPut<Appointment>(string.Format("appointment/{0}", appointment.Id), body);
     individualAppointmentResponse.Appointment = appointment;
     return individualAppointmentResponse;
 }
コード例 #2
0
        public IndividualAppointmentResponse GetAppointmentById(long appointmentId)
        {
            //return GenericGet<IndividualAppointmentResponse>(string.Format("appointments/{0}.json", appointmentId));

            IndividualAppointmentResponse individualAppointmentResponse = new IndividualAppointmentResponse();
            Appointment appointment = GenericGet<Appointment>(string.Format("appointment/{0}", appointmentId));
            individualAppointmentResponse.Appointment = appointment;
            return individualAppointmentResponse;  
        }
コード例 #3
0
        public IndividualAppointmentResponse CreateAppointment(Appointment appointment)
        {
            var body = appointment; //new { appointment };
            IndividualAppointmentResponse individualAppointmentResponse = new IndividualAppointmentResponse();
            Appointment retAppointment = GenericPost<Appointment>("appointment", body);
            if (retAppointment != null)
            {
                appointment.Id = retAppointment.Id;
                individualAppointmentResponse.Appointment = appointment;
            }
            return individualAppointmentResponse;

            //return GenericPost<IndividualAppointmentResponse>("appointments.json", body);
        }