class SwaggerClient::AppointmentApi
Attributes
Public Class Methods
# File lib/swagger_client/api/appointment_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Book a new appointment. To book an appointment, you must use a location ID, staff ID, client ID, session type ID, and the `StartDateTime` of the appointment. You can get most of this information using `GET BookableItems`. @param request @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. (default to ) @return [AddAppointmentResponse]
# File lib/swagger_client/api/appointment_api.rb, line 30 def appointment_add_apppointment(request, site_id, version, opts = {}) data, _status_code, _headers = appointment_add_apppointment_with_http_info(request, site_id, version, opts) data end
Book a new appointment. To book an appointment, you must use a location ID, staff ID, client ID, session type ID, and the `StartDateTime` of the appointment. You can get most of this information using `GET BookableItems`. @param request @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. @return [Array<(AddAppointmentResponse
, Fixnum, Hash)>] AddAppointmentResponse
data, response status code and response headers
# File lib/swagger_client/api/appointment_api.rb, line 43 def appointment_add_apppointment_with_http_info(request, site_id, version, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AppointmentApi.appointment_add_apppointment ...' end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling AppointmentApi.appointment_add_apppointment" end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling AppointmentApi.appointment_add_apppointment" end # verify the required parameter 'version' is set if @api_client.config.client_side_validation && version.nil? fail ArgumentError, "Missing the required parameter 'version' when calling AppointmentApi.appointment_add_apppointment" end # resource path local_var_path = '/public/v{version}/appointment/addappointment'.sub('{' + 'version' + '}', version.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded', 'multipart/form-data']) header_params[:'siteId'] = site_id header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil? # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AddAppointmentResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AppointmentApi#appointment_add_apppointment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get active session times. Returns a list of the times that can be booked for a given program schedule type. `ActiveSessionTimes` represent the scheduling increments that can be booked during the active business hours for services. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. (default to ) @option opts [DateTime] :request_end_time Filters results to times that end on or before this time on the current date. Any date provided is ignored.. <br />Default: 23:59:59 @option opts [Integer] :request_limit Number of results to include, defaults to 100 @option opts [Integer] :request_offset Page offset, defaults to 0. @option opts [String] :request_schedule_type Filters on the provided the schedule type. Either `SessionTypeIds` or `ScheduleType` must be provided. @option opts [Array<Integer>] :request_session_type_ids Filters on the provided session type IDs. Either `SessionTypeIds` or `ScheduleType` must be provided. @option opts [DateTime] :request_start_time Filters results to times that start on or after this time on the current date. Any date provided is ignored. <br />Default: 00:00:00 @return [GetActiveSessionTimesResponse]
# File lib/swagger_client/api/appointment_api.rb, line 105 def appointment_get_active_session_times(site_id, version, opts = {}) data, _status_code, _headers = appointment_get_active_session_times_with_http_info(site_id, version, opts) data end
Get active session times. Returns a list of the times that can be booked for a given program schedule type. `ActiveSessionTimes` represent the scheduling increments that can be booked during the active business hours for services. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. @option opts [DateTime] :request_end_time Filters results to times that end on or before this time on the current date. Any date provided is ignored.. <br />Default: 23:59:59 @option opts [Integer] :request_limit Number of results to include, defaults to 100 @option opts [Integer] :request_offset Page offset, defaults to 0. @option opts [String] :request_schedule_type Filters on the provided the schedule type. Either `SessionTypeIds` or `ScheduleType` must be provided. @option opts [Array<Integer>] :request_session_type_ids Filters on the provided session type IDs. Either `SessionTypeIds` or `ScheduleType` must be provided. @option opts [DateTime] :request_start_time Filters results to times that start on or after this time on the current date. Any date provided is ignored. <br />Default: 00:00:00 @return [Array<(GetActiveSessionTimesResponse
, Fixnum, Hash)>] GetActiveSessionTimesResponse
data, response status code and response headers
# File lib/swagger_client/api/appointment_api.rb, line 123 def appointment_get_active_session_times_with_http_info(site_id, version, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AppointmentApi.appointment_get_active_session_times ...' end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling AppointmentApi.appointment_get_active_session_times" end # verify the required parameter 'version' is set if @api_client.config.client_side_validation && version.nil? fail ArgumentError, "Missing the required parameter 'version' when calling AppointmentApi.appointment_get_active_session_times" end if @api_client.config.client_side_validation && opts[:'request_schedule_type'] && !['All', 'Class', 'Enrollment', 'Appointment', 'Resource', 'Media', 'Arrival'].include?(opts[:'request_schedule_type']) fail ArgumentError, 'invalid value for "request_schedule_type", must be one of All, Class, Enrollment, Appointment, Resource, Media, Arrival' end # resource path local_var_path = '/public/v{version}/appointment/activesessiontimes'.sub('{' + 'version' + '}', version.to_s) # query parameters query_params = {} query_params[:'request.endTime'] = opts[:'request_end_time'] if !opts[:'request_end_time'].nil? query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil? query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil? query_params[:'request.scheduleType'] = opts[:'request_schedule_type'] if !opts[:'request_schedule_type'].nil? query_params[:'request.sessionTypeIds'] = @api_client.build_collection_param(opts[:'request_session_type_ids'], :multi) if !opts[:'request_session_type_ids'].nil? query_params[:'request.startTime'] = opts[:'request_start_time'] if !opts[:'request_start_time'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data']) header_params[:'siteId'] = site_id header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil? # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GetActiveSessionTimesResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AppointmentApi#appointment_get_active_session_times\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get appointment-related settings. This endpoint has no query parameters. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. (default to ) @return [GetAppointmentOptionsResponse]
# File lib/swagger_client/api/appointment_api.rb, line 182 def appointment_get_appointment_options(site_id, version, opts = {}) data, _status_code, _headers = appointment_get_appointment_options_with_http_info(site_id, version, opts) data end
Get appointment-related settings. This endpoint has no query parameters. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. @return [Array<(GetAppointmentOptionsResponse
, Fixnum, Hash)>] GetAppointmentOptionsResponse
data, response status code and response headers
# File lib/swagger_client/api/appointment_api.rb, line 194 def appointment_get_appointment_options_with_http_info(site_id, version, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AppointmentApi.appointment_get_appointment_options ...' end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling AppointmentApi.appointment_get_appointment_options" end # verify the required parameter 'version' is set if @api_client.config.client_side_validation && version.nil? fail ArgumentError, "Missing the required parameter 'version' when calling AppointmentApi.appointment_get_appointment_options" end # resource path local_var_path = '/public/v{version}/appointment/appointmentoptions'.sub('{' + 'version' + '}', version.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data']) header_params[:'siteId'] = site_id header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil? # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GetAppointmentOptionsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AppointmentApi#appointment_get_appointment_options\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get staff appointment availability. Returns a list of availabilities with the information needed to book appointments. Availabilities include information such as the location and its amenities, staff members, programs, and session types. @param request_session_type_ids A list of the requested session type IDs. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. (default to ) @option opts [Integer] :request_appointment_id If provided, filters out the appointment with this ID. @option opts [DateTime] :request_end_date The end date of the requested date range. <br />Default: StartDate @option opts [BOOLEAN] :request_ignore_default_session_length When `true`, availabilities that are non-default return, for example, a 30-minute availability with a 60-minute default session length.<br /> When `false`, only availabilities that have the default session length return. @option opts [Integer] :request_limit Number of results to include, defaults to 100 @option opts [Array<Integer>] :request_location_ids A list of the requested location IDs. @option opts [Integer] :request_offset Page offset, defaults to 0. @option opts [Array<Integer>] :request_staff_ids A list of the requested staff IDs. @option opts [DateTime] :request_start_date The start date of the requested date range. <br />Default: **today’s date** @return [GetBookableItemsResponse]
# File lib/swagger_client/api/appointment_api.rb, line 253 def appointment_get_bookable_items(request_session_type_ids, site_id, version, opts = {}) data, _status_code, _headers = appointment_get_bookable_items_with_http_info(request_session_type_ids, site_id, version, opts) data end
Get staff appointment availability. Returns a list of availabilities with the information needed to book appointments. Availabilities include information such as the location and its amenities, staff members, programs, and session types. @param request_session_type_ids A list of the requested session type IDs. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. @option opts [Integer] :request_appointment_id If provided, filters out the appointment with this ID. @option opts [DateTime] :request_end_date The end date of the requested date range. <br />Default: StartDate @option opts [BOOLEAN] :request_ignore_default_session_length When `true`, availabilities that are non-default return, for example, a 30-minute availability with a 60-minute default session length.<br /> When `false`, only availabilities that have the default session length return. @option opts [Integer] :request_limit Number of results to include, defaults to 100 @option opts [Array<Integer>] :request_location_ids A list of the requested location IDs. @option opts [Integer] :request_offset Page offset, defaults to 0. @option opts [Array<Integer>] :request_staff_ids A list of the requested staff IDs. @option opts [DateTime] :request_start_date The start date of the requested date range. <br />Default: **today’s date** @return [Array<(GetBookableItemsResponse
, Fixnum, Hash)>] GetBookableItemsResponse
data, response status code and response headers
# File lib/swagger_client/api/appointment_api.rb, line 274 def appointment_get_bookable_items_with_http_info(request_session_type_ids, site_id, version, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AppointmentApi.appointment_get_bookable_items ...' end # verify the required parameter 'request_session_type_ids' is set if @api_client.config.client_side_validation && request_session_type_ids.nil? fail ArgumentError, "Missing the required parameter 'request_session_type_ids' when calling AppointmentApi.appointment_get_bookable_items" end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling AppointmentApi.appointment_get_bookable_items" end # verify the required parameter 'version' is set if @api_client.config.client_side_validation && version.nil? fail ArgumentError, "Missing the required parameter 'version' when calling AppointmentApi.appointment_get_bookable_items" end # resource path local_var_path = '/public/v{version}/appointment/bookableitems'.sub('{' + 'version' + '}', version.to_s) # query parameters query_params = {} query_params[:'request.sessionTypeIds'] = @api_client.build_collection_param(request_session_type_ids, :multi) query_params[:'request.appointmentId'] = opts[:'request_appointment_id'] if !opts[:'request_appointment_id'].nil? query_params[:'request.endDate'] = opts[:'request_end_date'] if !opts[:'request_end_date'].nil? query_params[:'request.ignoreDefaultSessionLength'] = opts[:'request_ignore_default_session_length'] if !opts[:'request_ignore_default_session_length'].nil? query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil? query_params[:'request.locationIds'] = @api_client.build_collection_param(opts[:'request_location_ids'], :multi) if !opts[:'request_location_ids'].nil? query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil? query_params[:'request.staffIds'] = @api_client.build_collection_param(opts[:'request_staff_ids'], :multi) if !opts[:'request_staff_ids'].nil? query_params[:'request.startDate'] = opts[:'request_start_date'] if !opts[:'request_start_date'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data']) header_params[:'siteId'] = site_id header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil? # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GetBookableItemsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AppointmentApi#appointment_get_bookable_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get appointment schedule. Returns a list of schedule items, including appointments, availabilities, and unavailabilities. Unavailabilities are the times at which appointments cannot be booked, for example, on holidays or after hours when the business is closed. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. (default to ) @option opts [DateTime] :request_end_date The end date of the requested date range. <br />Default: **today’s date** @option opts [BOOLEAN] :request_ignore_prep_finish_times When `true`, appointment preparation and finish unavailabilities are not returned. <br />Default: false @option opts [Integer] :request_limit Number of results to include, defaults to 100 @option opts [Array<Integer>] :request_location_ids A list of requested location IDs. @option opts [Integer] :request_offset Page offset, defaults to 0. @option opts [Array<Integer>] :request_staff_ids A list of requested staff IDs. @option opts [DateTime] :request_start_date The start date of the requested date range. <br />Default: **today’s date** @return [GetScheduleItemsResponse]
# File lib/swagger_client/api/appointment_api.rb, line 344 def appointment_get_schedule_items(site_id, version, opts = {}) data, _status_code, _headers = appointment_get_schedule_items_with_http_info(site_id, version, opts) data end
Get appointment schedule. Returns a list of schedule items, including appointments, availabilities, and unavailabilities. Unavailabilities are the times at which appointments cannot be booked, for example, on holidays or after hours when the business is closed. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. @option opts [DateTime] :request_end_date The end date of the requested date range. <br />Default: **today’s date** @option opts [BOOLEAN] :request_ignore_prep_finish_times When `true`, appointment preparation and finish unavailabilities are not returned. <br />Default: false @option opts [Integer] :request_limit Number of results to include, defaults to 100 @option opts [Array<Integer>] :request_location_ids A list of requested location IDs. @option opts [Integer] :request_offset Page offset, defaults to 0. @option opts [Array<Integer>] :request_staff_ids A list of requested staff IDs. @option opts [DateTime] :request_start_date The start date of the requested date range. <br />Default: **today’s date** @return [Array<(GetScheduleItemsResponse
, Fixnum, Hash)>] GetScheduleItemsResponse
data, response status code and response headers
# File lib/swagger_client/api/appointment_api.rb, line 363 def appointment_get_schedule_items_with_http_info(site_id, version, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AppointmentApi.appointment_get_schedule_items ...' end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling AppointmentApi.appointment_get_schedule_items" end # verify the required parameter 'version' is set if @api_client.config.client_side_validation && version.nil? fail ArgumentError, "Missing the required parameter 'version' when calling AppointmentApi.appointment_get_schedule_items" end # resource path local_var_path = '/public/v{version}/appointment/scheduleitems'.sub('{' + 'version' + '}', version.to_s) # query parameters query_params = {} query_params[:'request.endDate'] = opts[:'request_end_date'] if !opts[:'request_end_date'].nil? query_params[:'request.ignorePrepFinishTimes'] = opts[:'request_ignore_prep_finish_times'] if !opts[:'request_ignore_prep_finish_times'].nil? query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil? query_params[:'request.locationIds'] = @api_client.build_collection_param(opts[:'request_location_ids'], :multi) if !opts[:'request_location_ids'].nil? query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil? query_params[:'request.staffIds'] = @api_client.build_collection_param(opts[:'request_staff_ids'], :multi) if !opts[:'request_staff_ids'].nil? query_params[:'request.startDate'] = opts[:'request_start_date'] if !opts[:'request_start_date'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data']) header_params[:'siteId'] = site_id header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil? # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GetScheduleItemsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AppointmentApi#appointment_get_schedule_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get appointments grouped by staff member. Returns a list of appointments by staff member. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. (default to ) @option opts [Array<Integer>] :request_appointment_ids A list of the requested appointment IDs. @option opts [Array<String>] :request_client_ids List of client IDs to be returned. @option opts [DateTime] :request_end_date The end date of the requested date range. <br />Default: StartDate @option opts [Integer] :request_limit Number of results to include, defaults to 100 @option opts [Array<Integer>] :request_location_ids A list of the requested location IDs. @option opts [Integer] :request_offset Page offset, defaults to 0. @option opts [Array<Integer>] :request_staff_ids List of staff IDs to be returned. Use a value of zero to return all staff appointments. @option opts [DateTime] :request_start_date The start date of the requested date range. If omitted, the default is used. <br />Default: **today’s date** @return [GetStaffAppointmentsResponse]
# File lib/swagger_client/api/appointment_api.rb, line 428 def appointment_get_staff_appointments(site_id, version, opts = {}) data, _status_code, _headers = appointment_get_staff_appointments_with_http_info(site_id, version, opts) data end
Get appointments grouped by staff member. Returns a list of appointments by staff member. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. @option opts [Array<Integer>] :request_appointment_ids A list of the requested appointment IDs. @option opts [Array<String>] :request_client_ids List of client IDs to be returned. @option opts [DateTime] :request_end_date The end date of the requested date range. <br />Default: StartDate @option opts [Integer] :request_limit Number of results to include, defaults to 100 @option opts [Array<Integer>] :request_location_ids A list of the requested location IDs. @option opts [Integer] :request_offset Page offset, defaults to 0. @option opts [Array<Integer>] :request_staff_ids List of staff IDs to be returned. Use a value of zero to return all staff appointments. @option opts [DateTime] :request_start_date The start date of the requested date range. If omitted, the default is used. <br />Default: **today’s date** @return [Array<(GetStaffAppointmentsResponse
, Fixnum, Hash)>] GetStaffAppointmentsResponse
data, response status code and response headers
# File lib/swagger_client/api/appointment_api.rb, line 448 def appointment_get_staff_appointments_with_http_info(site_id, version, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AppointmentApi.appointment_get_staff_appointments ...' end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling AppointmentApi.appointment_get_staff_appointments" end # verify the required parameter 'version' is set if @api_client.config.client_side_validation && version.nil? fail ArgumentError, "Missing the required parameter 'version' when calling AppointmentApi.appointment_get_staff_appointments" end # resource path local_var_path = '/public/v{version}/appointment/staffappointments'.sub('{' + 'version' + '}', version.to_s) # query parameters query_params = {} query_params[:'request.appointmentIds'] = @api_client.build_collection_param(opts[:'request_appointment_ids'], :multi) if !opts[:'request_appointment_ids'].nil? query_params[:'request.clientIds'] = @api_client.build_collection_param(opts[:'request_client_ids'], :multi) if !opts[:'request_client_ids'].nil? query_params[:'request.endDate'] = opts[:'request_end_date'] if !opts[:'request_end_date'].nil? query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil? query_params[:'request.locationIds'] = @api_client.build_collection_param(opts[:'request_location_ids'], :multi) if !opts[:'request_location_ids'].nil? query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil? query_params[:'request.staffIds'] = @api_client.build_collection_param(opts[:'request_staff_ids'], :multi) if !opts[:'request_staff_ids'].nil? query_params[:'request.startDate'] = opts[:'request_start_date'] if !opts[:'request_start_date'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data']) header_params[:'siteId'] = site_id header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil? # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GetStaffAppointmentsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AppointmentApi#appointment_get_staff_appointments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update an existing appointment. To update the information for a specific appointment, you must have a staff user token with the proper permissions. Note that you can only update the appointment’s `StartDateTime`, `EndDateTime`, `StaffId`, `Notes`, and `SessionTypeId`. @param request @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. (default to ) @return [UpdateAppointmentResponse]
# File lib/swagger_client/api/appointment_api.rb, line 507 def appointment_update_apppointment(request, site_id, version, opts = {}) data, _status_code, _headers = appointment_update_apppointment_with_http_info(request, site_id, version, opts) data end
Update an existing appointment. To update the information for a specific appointment, you must have a staff user token with the proper permissions. Note that you can only update the appointment’s `StartDateTime`, `EndDateTime`, `StaffId`, `Notes`, and `SessionTypeId`. @param request @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. @return [Array<(UpdateAppointmentResponse
, Fixnum, Hash)>] UpdateAppointmentResponse
data, response status code and response headers
# File lib/swagger_client/api/appointment_api.rb, line 520 def appointment_update_apppointment_with_http_info(request, site_id, version, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AppointmentApi.appointment_update_apppointment ...' end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling AppointmentApi.appointment_update_apppointment" end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling AppointmentApi.appointment_update_apppointment" end # verify the required parameter 'version' is set if @api_client.config.client_side_validation && version.nil? fail ArgumentError, "Missing the required parameter 'version' when calling AppointmentApi.appointment_update_apppointment" end # resource path local_var_path = '/public/v{version}/appointment/updateappointment'.sub('{' + 'version' + '}', version.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded', 'multipart/form-data']) header_params[:'siteId'] = site_id header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil? # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UpdateAppointmentResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AppointmentApi#appointment_update_apppointment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end