Class: SwaggerClient::AppointmentApi

Inherits:
Object
  • Object
show all
Defined in:
lib/swagger_client/api/appointment_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_clientObject

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`.

Parameters:

  • request
  • site_id

    ID of the site from which to pull data.

  • version
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token. (default to )

Returns:



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 &#x60;StartDateTime&#x60; of the appointment. You can get most of this information using &#x60;GET BookableItems&#x60;.

Parameters:

  • request
  • site_id

    ID of the site from which to pull data.

  • version
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token.

Returns:

  • (Array<(AddAppointmentResponse, Fixnum, Hash)>)

    AddAppointmentResponse data, response status code and response headers



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.

Parameters:

  • site_id

    ID of the site from which to pull data.

  • version
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token. (default to )

  • :request_end_time (DateTime)

    Filters results to times that end on or before this time on the current date. Any date provided is ignored.. &lt;br /&gt;Default: 23:59:59

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_offset (Integer)

    Page offset, defaults to 0.

  • :request_schedule_type (String)

    Filters on the provided the schedule type. Either &#x60;SessionTypeIds&#x60; or &#x60;ScheduleType&#x60; must be provided.

  • :request_session_type_ids (Array<Integer>)

    Filters on the provided session type IDs. Either &#x60;SessionTypeIds&#x60; or &#x60;ScheduleType&#x60; must be provided.

  • :request_start_time (DateTime)

    Filters results to times that start on or after this time on the current date. Any date provided is ignored. &lt;br /&gt;Default: 00:00:00

Returns:



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. &#x60;ActiveSessionTimes&#x60; represent the scheduling increments that can be booked during the active business hours for services.

Parameters:

  • site_id

    ID of the site from which to pull data.

  • version
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token.

  • :request_end_time (DateTime)

    Filters results to times that end on or before this time on the current date. Any date provided is ignored.. &lt;br /&gt;Default: 23:59:59

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_offset (Integer)

    Page offset, defaults to 0.

  • :request_schedule_type (String)

    Filters on the provided the schedule type. Either &#x60;SessionTypeIds&#x60; or &#x60;ScheduleType&#x60; must be provided.

  • :request_session_type_ids (Array<Integer>)

    Filters on the provided session type IDs. Either &#x60;SessionTypeIds&#x60; or &#x60;ScheduleType&#x60; must be provided.

  • :request_start_time (DateTime)

    Filters results to times that start on or after this time on the current date. Any date provided is ignored. &lt;br /&gt;Default: 00:00:00

Returns:



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.

Parameters:

  • site_id

    ID of the site from which to pull data.

  • version
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token. (default to )

Returns:



182
183
184
185
# 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

#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.

Parameters:

  • site_id

    ID of the site from which to pull data.

  • version
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token.

Returns:



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 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

#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.

Parameters:

  • request_session_type_ids

    A list of the requested session type IDs.

  • site_id

    ID of the site from which to pull data.

  • version
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token. (default to )

  • :request_appointment_id (Integer)

    If provided, filters out the appointment with this ID.

  • :request_end_date (DateTime)

    The end date of the requested date range. &lt;br /&gt;Default: StartDate

  • :request_ignore_default_session_length (BOOLEAN)

    When &#x60;true&#x60;, availabilities that are non-default return, for example, a 30-minute availability with a 60-minute default session length.&lt;br /&gt; When &#x60;false&#x60;, only availabilities that have the default session length return.

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_location_ids (Array<Integer>)

    A list of the requested location IDs.

  • :request_offset (Integer)

    Page offset, defaults to 0.

  • :request_staff_ids (Array<Integer>)

    A list of the requested staff IDs.

  • :request_start_date (DateTime)

    The start date of the requested date range. &lt;br /&gt;Default: **today’s date**

Returns:



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.

Parameters:

  • request_session_type_ids

    A list of the requested session type IDs.

  • site_id

    ID of the site from which to pull data.

  • version
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token.

  • :request_appointment_id (Integer)

    If provided, filters out the appointment with this ID.

  • :request_end_date (DateTime)

    The end date of the requested date range. &lt;br /&gt;Default: StartDate

  • :request_ignore_default_session_length (BOOLEAN)

    When &#x60;true&#x60;, availabilities that are non-default return, for example, a 30-minute availability with a 60-minute default session length.&lt;br /&gt; When &#x60;false&#x60;, only availabilities that have the default session length return.

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_location_ids (Array<Integer>)

    A list of the requested location IDs.

  • :request_offset (Integer)

    Page offset, defaults to 0.

  • :request_staff_ids (Array<Integer>)

    A list of the requested staff IDs.

  • :request_start_date (DateTime)

    The start date of the requested date range. &lt;br /&gt;Default: **today’s date**

Returns:

  • (Array<(GetBookableItemsResponse, Fixnum, Hash)>)

    GetBookableItemsResponse data, response status code and response headers



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.

Parameters:

  • site_id

    ID of the site from which to pull data.

  • version
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token. (default to )

  • :request_end_date (DateTime)

    The end date of the requested date range. &lt;br /&gt;Default: **today’s date**

  • :request_ignore_prep_finish_times (BOOLEAN)

    When &#x60;true&#x60;, appointment preparation and finish unavailabilities are not returned. &lt;br /&gt;Default: false

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_location_ids (Array<Integer>)

    A list of requested location IDs.

  • :request_offset (Integer)

    Page offset, defaults to 0.

  • :request_staff_ids (Array<Integer>)

    A list of requested staff IDs.

  • :request_start_date (DateTime)

    The start date of the requested date range. &lt;br /&gt;Default: **today’s date**

Returns:



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.

Parameters:

  • site_id

    ID of the site from which to pull data.

  • version
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token.

  • :request_end_date (DateTime)

    The end date of the requested date range. &lt;br /&gt;Default: **today’s date**

  • :request_ignore_prep_finish_times (BOOLEAN)

    When &#x60;true&#x60;, appointment preparation and finish unavailabilities are not returned. &lt;br /&gt;Default: false

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_location_ids (Array<Integer>)

    A list of requested location IDs.

  • :request_offset (Integer)

    Page offset, defaults to 0.

  • :request_staff_ids (Array<Integer>)

    A list of requested staff IDs.

  • :request_start_date (DateTime)

    The start date of the requested date range. &lt;br /&gt;Default: **today’s date**

Returns:

  • (Array<(GetScheduleItemsResponse, Fixnum, Hash)>)

    GetScheduleItemsResponse data, response status code and response headers



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.

Parameters:

  • site_id

    ID of the site from which to pull data.

  • version
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token. (default to )

  • :request_appointment_ids (Array<Integer>)

    A list of the requested appointment IDs.

  • :request_client_ids (Array<String>)

    List of client IDs to be returned.

  • :request_end_date (DateTime)

    The end date of the requested date range. &lt;br /&gt;Default: StartDate

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_location_ids (Array<Integer>)

    A list of the requested location IDs.

  • :request_offset (Integer)

    Page offset, defaults to 0.

  • :request_staff_ids (Array<Integer>)

    List of staff IDs to be returned. Use a value of zero to return all staff appointments.

  • :request_start_date (DateTime)

    The start date of the requested date range. If omitted, the default is used. &lt;br /&gt;Default: **today’s date**

Returns:



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.

Parameters:

  • site_id

    ID of the site from which to pull data.

  • version
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token.

  • :request_appointment_ids (Array<Integer>)

    A list of the requested appointment IDs.

  • :request_client_ids (Array<String>)

    List of client IDs to be returned.

  • :request_end_date (DateTime)

    The end date of the requested date range. &lt;br /&gt;Default: StartDate

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_location_ids (Array<Integer>)

    A list of the requested location IDs.

  • :request_offset (Integer)

    Page offset, defaults to 0.

  • :request_staff_ids (Array<Integer>)

    List of staff IDs to be returned. Use a value of zero to return all staff appointments.

  • :request_start_date (DateTime)

    The start date of the requested date range. If omitted, the default is used. &lt;br /&gt;Default: **today’s date**

Returns:



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`.

Parameters:

  • request
  • site_id

    ID of the site from which to pull data.

  • version
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token. (default to )

Returns:



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 &#x60;StartDateTime&#x60;, &#x60;EndDateTime&#x60;, &#x60;StaffId&#x60;, &#x60;Notes&#x60;, and &#x60;SessionTypeId&#x60;.

Parameters:

  • request
  • site_id

    ID of the site from which to pull data.

  • version
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    A staff user authorization token.

Returns:

  • (Array<(UpdateAppointmentResponse, Fixnum, Hash)>)

    UpdateAppointmentResponse data, response status code and response headers



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