Class: SwaggerClient::AppointmentApi
- Inherits:
-
Object
- Object
- SwaggerClient::AppointmentApi
- Defined in:
- lib/swagger_client/api/appointment_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#appointment_add_apppointment(request, site_id, version, opts = {}) ⇒ AddAppointmentResponse
Book a new appointment.
-
#appointment_add_apppointment_with_http_info(request, site_id, version, opts = {}) ⇒ Array<(AddAppointmentResponse, Fixnum, Hash)>
Book a new appointment.
-
#appointment_get_active_session_times(site_id, version, opts = {}) ⇒ GetActiveSessionTimesResponse
Get active session times.
-
#appointment_get_active_session_times_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetActiveSessionTimesResponse, Fixnum, Hash)>
Get active session times.
-
#appointment_get_appointment_options(site_id, version, opts = {}) ⇒ GetAppointmentOptionsResponse
Get appointment-related settings.
-
#appointment_get_appointment_options_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetAppointmentOptionsResponse, Fixnum, Hash)>
Get appointment-related settings.
-
#appointment_get_bookable_items(request_session_type_ids, site_id, version, opts = {}) ⇒ GetBookableItemsResponse
Get staff appointment availability.
-
#appointment_get_bookable_items_with_http_info(request_session_type_ids, site_id, version, opts = {}) ⇒ Array<(GetBookableItemsResponse, Fixnum, Hash)>
Get staff appointment availability.
-
#appointment_get_schedule_items(site_id, version, opts = {}) ⇒ GetScheduleItemsResponse
Get appointment schedule.
-
#appointment_get_schedule_items_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetScheduleItemsResponse, Fixnum, Hash)>
Get appointment schedule.
-
#appointment_get_staff_appointments(site_id, version, opts = {}) ⇒ GetStaffAppointmentsResponse
Get appointments grouped by staff member.
-
#appointment_get_staff_appointments_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetStaffAppointmentsResponse, Fixnum, Hash)>
Get appointments grouped by staff member.
-
#appointment_update_apppointment(request, site_id, version, opts = {}) ⇒ UpdateAppointmentResponse
Update an existing appointment.
-
#appointment_update_apppointment_with_http_info(request, site_id, version, opts = {}) ⇒ Array<(UpdateAppointmentResponse, Fixnum, Hash)>
Update an existing appointment.
-
#initialize(api_client = ApiClient.default) ⇒ AppointmentApi
constructor
A new instance of AppointmentApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ AppointmentApi
Returns a new instance of AppointmentApi.
19 20 21 |
# File 'lib/swagger_client/api/appointment_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/swagger_client/api/appointment_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#appointment_add_apppointment(request, site_id, version, opts = {}) ⇒ AddAppointmentResponse
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`.
30 31 32 33 |
# 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 |
#appointment_add_apppointment_with_http_info(request, site_id, version, opts = {}) ⇒ Array<(AddAppointmentResponse, Fixnum, Hash)>
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`.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# 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 |
#appointment_get_active_session_times(site_id, version, opts = {}) ⇒ GetActiveSessionTimesResponse
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.
105 106 107 108 |
# 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 |
#appointment_get_active_session_times_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetActiveSessionTimesResponse, Fixnum, Hash)>
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.
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 |
# 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 |
#appointment_get_appointment_options(site_id, version, opts = {}) ⇒ GetAppointmentOptionsResponse
Get appointment-related settings. This endpoint has no query parameters.
182 183 184 185 |
# File 'lib/swagger_client/api/appointment_api.rb', line 182 def (site_id, version, opts = {}) data, _status_code, _headers = (site_id, version, opts) data end |
#appointment_get_appointment_options_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetAppointmentOptionsResponse, Fixnum, Hash)>
Get appointment-related settings. This endpoint has no query parameters.
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 |
# File 'lib/swagger_client/api/appointment_api.rb', line 194 def (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 |
#appointment_get_bookable_items(request_session_type_ids, site_id, version, opts = {}) ⇒ GetBookableItemsResponse
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.
253 254 255 256 |
# 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 |
#appointment_get_bookable_items_with_http_info(request_session_type_ids, site_id, version, opts = {}) ⇒ Array<(GetBookableItemsResponse, Fixnum, Hash)>
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.
274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 |
# 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 |
#appointment_get_schedule_items(site_id, version, opts = {}) ⇒ GetScheduleItemsResponse
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.
344 345 346 347 |
# 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 |
#appointment_get_schedule_items_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetScheduleItemsResponse, Fixnum, Hash)>
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.
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 |
# 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 |
#appointment_get_staff_appointments(site_id, version, opts = {}) ⇒ GetStaffAppointmentsResponse
Get appointments grouped by staff member. Returns a list of appointments by staff member.
428 429 430 431 |
# 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 |
#appointment_get_staff_appointments_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetStaffAppointmentsResponse, Fixnum, Hash)>
Get appointments grouped by staff member. Returns a list of appointments by staff member.
448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 |
# 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 |
#appointment_update_apppointment(request, site_id, version, opts = {}) ⇒ UpdateAppointmentResponse
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`.
507 508 509 510 |
# 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 |
#appointment_update_apppointment_with_http_info(request, site_id, version, opts = {}) ⇒ Array<(UpdateAppointmentResponse, Fixnum, Hash)>
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`.
520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 |
# 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 |