Class: SwaggerClient::ClassApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ClassApi

Returns a new instance of ClassApi.



19
20
21
# File 'lib/swagger_client/api/class_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/class_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#class_add_client_to_class(request, site_id, version, opts = {}) ⇒ AddClientToClassResponse

Book a client into a class. This endpoint adds a client to a class or to a class waiting list. It is helpful to use this endpoint in the following situations: * Use after calling ‘GET Clients` and `GET Classes` so that you are sure which client to book in which class. * If adding a client to a class from a waiting list, use this call after you call `GET WaitlistEntries` and determine the ID of the waiting list from which you are moving the client. * If adding a client to a class and using a pricing option that the client has already purchased, use this call after you call `GET ClientServices` to determine the ID of the pricing option that the client wants to use. If you add a client to a class and the client purchases a new pricing option, use `GET Services`, `GET Classes`, and then `POST CheckoutShoppingCart` in place of this call. This endpoint also supports cross-regional class bookings. If you want to perform a cross-regional class booking, set `CrossRegionalBooking` to `true`. This endpoint does not support adding a user to a waiting list using a cross-regional client pricing option(service). Cross-regional booking workflows do not support client service scheduling restrictions. When performing a cross-regional class booking, this endpoint loops through the first ten sites that the client is associated with, looks for client pricing options at each of those sites, and then uses the oldest client pricing option found.It is important to note that this endpoint only loops through a maximum of ten associated client sites. If a `ClientID` is associated with more than ten sites in an organization, this endpoint only loops through the first ten.If you know that a client has a client service at another site, you can specify that site using the `CrossRegionalBookingClientServiceSiteId` query parameter. If you perform a cross-regional booking, two additional fields are included in the `SessionType` object of the response: * `SiteID`, which specifies where the client service is coming from * `CrossRegionalBookingPerformed`, a Boolean field that is set to `true` As a prerequisite to using this endpoint, your `SourceName` must have been granted access to the organization to which the site belongs.

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/class_api.rb', line 30

def class_add_client_to_class(request, site_id, version, opts = {})
  data, _status_code, _headers = class_add_client_to_class_with_http_info(request, site_id, version, opts)
  data
end

#class_add_client_to_class_with_http_info(request, site_id, version, opts = {}) ⇒ Array<(AddClientToClassResponse, Fixnum, Hash)>

Book a client into a class. This endpoint adds a client to a class or to a class waiting list. It is helpful to use this endpoint in the following situations: * Use after calling &#x60;GET Clients&#x60; and &#x60;GET Classes&#x60; so that you are sure which client to book in which class. * If adding a client to a class from a waiting list, use this call after you call &#x60;GET WaitlistEntries&#x60; and determine the ID of the waiting list from which you are moving the client. * If adding a client to a class and using a pricing option that the client has already purchased, use this call after you call &#x60;GET ClientServices&#x60; to determine the ID of the pricing option that the client wants to use. If you add a client to a class and the client purchases a new pricing option, use &#x60;GET Services&#x60;, &#x60;GET Classes&#x60;, and then &#x60;POST CheckoutShoppingCart&#x60; in place of this call. This endpoint also supports cross-regional class bookings. If you want to perform a cross-regional class booking, set &#x60;CrossRegionalBooking&#x60; to &#x60;true&#x60;. This endpoint does not support adding a user to a waiting list using a cross-regional client pricing option(service). Cross-regional booking workflows do not support client service scheduling restrictions. When performing a cross-regional class booking, this endpoint loops through the first ten sites that the client is associated with, looks for client pricing options at each of those sites, and then uses the oldest client pricing option found.It is important to note that this endpoint only loops through a maximum of ten associated client sites. If a &#x60;ClientID&#x60; is associated with more than ten sites in an organization, this endpoint only loops through the first ten.If you know that a client has a client service at another site, you can specify that site using the &#x60;CrossRegionalBookingClientServiceSiteId&#x60; query parameter. If you perform a cross-regional booking, two additional fields are included in the &#x60;SessionType&#x60; object of the response: * &#x60;SiteID&#x60;, which specifies where the client service is coming from * &#x60;CrossRegionalBookingPerformed&#x60;, a Boolean field that is set to &#x60;true&#x60; As a prerequisite to using this endpoint, your &#x60;SourceName&#x60; must have been granted access to the organization to which the site belongs.

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<(AddClientToClassResponse, Fixnum, Hash)>)

    AddClientToClassResponse 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/class_api.rb', line 43

def class_add_client_to_class_with_http_info(request, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClassApi.class_add_client_to_class ...'
  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 ClassApi.class_add_client_to_class"
  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 ClassApi.class_add_client_to_class"
  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 ClassApi.class_add_client_to_class"
  end
  # resource path
  local_var_path = '/public/v{version}/class/addclienttoclass'.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 => 'AddClientToClassResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClassApi#class_add_client_to_class\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#class_get_class_descriptions(site_id, version, opts = {}) ⇒ GetClassDescriptionsResponse

Get class descriptions. To find class descriptions associated with **scheduled classes**, pass ‘StaffId`, `StartClassDateTime`, `EndClassDateTime`, or `LocationId` in the request.

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_class_description_id (Integer)

    Filters to the single result with the given ID.

  • :request_end_class_date_time (DateTime)

    Filters the results to class descriptions for scheduled classes that happen before the given date and time.

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_location_id (Integer)

    Filters results to classes descriptions for schedule classes as the given location.

  • :request_offset (Integer)

    Page offset, defaults to 0.

  • :request_program_ids (Array<Integer>)

    Filters results to class descriptions belonging to the given programs.

  • :request_staff_id (Integer)

    Filters results to class descriptions for scheduled classes taught by the given staff member.

  • :request_start_class_date_time (DateTime)

    Filters the results to class descriptions for scheduled classes that happen on or after the given date and time.

Returns:



107
108
109
110
# File 'lib/swagger_client/api/class_api.rb', line 107

def class_get_class_descriptions(site_id, version, opts = {})
  data, _status_code, _headers = class_get_class_descriptions_with_http_info(site_id, version, opts)
  data
end

#class_get_class_descriptions_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetClassDescriptionsResponse, Fixnum, Hash)>

Get class descriptions. To find class descriptions associated with **scheduled classes**, pass &#x60;StaffId&#x60;, &#x60;StartClassDateTime&#x60;, &#x60;EndClassDateTime&#x60;, or &#x60;LocationId&#x60; in the request.

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_class_description_id (Integer)

    Filters to the single result with the given ID.

  • :request_end_class_date_time (DateTime)

    Filters the results to class descriptions for scheduled classes that happen before the given date and time.

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_location_id (Integer)

    Filters results to classes descriptions for schedule classes as the given location.

  • :request_offset (Integer)

    Page offset, defaults to 0.

  • :request_program_ids (Array<Integer>)

    Filters results to class descriptions belonging to the given programs.

  • :request_staff_id (Integer)

    Filters results to class descriptions for scheduled classes taught by the given staff member.

  • :request_start_class_date_time (DateTime)

    Filters the results to class descriptions for scheduled classes that happen on or after the given date and time.

Returns:



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
175
176
177
# File 'lib/swagger_client/api/class_api.rb', line 127

def class_get_class_descriptions_with_http_info(site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClassApi.class_get_class_descriptions ...'
  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 ClassApi.class_get_class_descriptions"
  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 ClassApi.class_get_class_descriptions"
  end
  # resource path
  local_var_path = '/public/v{version}/class/classdescriptions'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}
  query_params[:'request.classDescriptionId'] = opts[:'request_class_description_id'] if !opts[:'request_class_description_id'].nil?
  query_params[:'request.endClassDateTime'] = opts[:'request_end_class_date_time'] if !opts[:'request_end_class_date_time'].nil?
  query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil?
  query_params[:'request.locationId'] = opts[:'request_location_id'] if !opts[:'request_location_id'].nil?
  query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil?
  query_params[:'request.programIds'] = @api_client.build_collection_param(opts[:'request_program_ids'], :multi) if !opts[:'request_program_ids'].nil?
  query_params[:'request.staffId'] = opts[:'request_staff_id'] if !opts[:'request_staff_id'].nil?
  query_params[:'request.startClassDateTime'] = opts[:'request_start_class_date_time'] if !opts[:'request_start_class_date_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 => 'GetClassDescriptionsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClassApi#class_get_class_descriptions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#class_get_class_schedules(site_id, version, opts = {}) ⇒ GetClassSchedulesResponse

Get class schedules.

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_class_schedule_ids (Array<Integer>)

    The class schedule IDs. &lt;br /&gt;Default: all

  • :request_end_date (DateTime)

    The end date of the range. Return any active enrollments that occur on or before this day. &lt;br /&gt;Default: StartDate

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_location_ids (Array<Integer>)

    The location IDs. &lt;br /&gt;Default: all

  • :request_offset (Integer)

    Page offset, defaults to 0.

  • :request_program_ids (Array<Integer>)

    The program IDs. &lt;br /&gt;Default: all

  • :request_session_type_ids (Array<Integer>)

    The session type IDs. &lt;br /&gt;Default: all

  • :request_staff_ids (Array<Integer>)

    The staff IDs. &lt;br /&gt;Default: all

  • :request_start_date (DateTime)

    The start date of the range. Return any active enrollments that occur on or after this day. &lt;br /&gt;Default: **today’s date**

Returns:



193
194
195
196
# File 'lib/swagger_client/api/class_api.rb', line 193

def class_get_class_schedules(site_id, version, opts = {})
  data, _status_code, _headers = class_get_class_schedules_with_http_info(site_id, version, opts)
  data
end

#class_get_class_schedules_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetClassSchedulesResponse, Fixnum, Hash)>

Get class schedules.

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_class_schedule_ids (Array<Integer>)

    The class schedule IDs. &lt;br /&gt;Default: all

  • :request_end_date (DateTime)

    The end date of the range. Return any active enrollments that occur on or before this day. &lt;br /&gt;Default: StartDate

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_location_ids (Array<Integer>)

    The location IDs. &lt;br /&gt;Default: all

  • :request_offset (Integer)

    Page offset, defaults to 0.

  • :request_program_ids (Array<Integer>)

    The program IDs. &lt;br /&gt;Default: all

  • :request_session_type_ids (Array<Integer>)

    The session type IDs. &lt;br /&gt;Default: all

  • :request_staff_ids (Array<Integer>)

    The staff IDs. &lt;br /&gt;Default: all

  • :request_start_date (DateTime)

    The start date of the range. Return any active enrollments that occur on or after this day. &lt;br /&gt;Default: **today’s date**

Returns:

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

    GetClassSchedulesResponse data, response status code and response headers



213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
# File 'lib/swagger_client/api/class_api.rb', line 213

def class_get_class_schedules_with_http_info(site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClassApi.class_get_class_schedules ...'
  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 ClassApi.class_get_class_schedules"
  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 ClassApi.class_get_class_schedules"
  end
  # resource path
  local_var_path = '/public/v{version}/class/classschedules'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}
  query_params[:'request.classScheduleIds'] = @api_client.build_collection_param(opts[:'request_class_schedule_ids'], :multi) if !opts[:'request_class_schedule_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.programIds'] = @api_client.build_collection_param(opts[:'request_program_ids'], :multi) if !opts[:'request_program_ids'].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.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 => 'GetClassSchedulesResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClassApi#class_get_class_schedules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#class_get_class_visits(site_id, version, opts = {}) ⇒ GetClassVisitsResponse

Get information about clients booked in a class. Returns a list of visits that contain information for a specified class. On success, this request returns the class object in the response with a list of visits.

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_class_id (Integer)

    The class ID.

  • :request_last_modified_date (DateTime)

    When included in the request, only records modified on or after the &#x60;LastModifiedDate&#x60; specified are included in the response.

Returns:



274
275
276
277
# File 'lib/swagger_client/api/class_api.rb', line 274

def class_get_class_visits(site_id, version, opts = {})
  data, _status_code, _headers = class_get_class_visits_with_http_info(site_id, version, opts)
  data
end

#class_get_class_visits_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetClassVisitsResponse, Fixnum, Hash)>

Get information about clients booked in a class. Returns a list of visits that contain information for a specified class. On success, this request returns the class object in the response with a list of visits.

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_class_id (Integer)

    The class ID.

  • :request_last_modified_date (DateTime)

    When included in the request, only records modified on or after the &#x60;LastModifiedDate&#x60; specified are included in the response.

Returns:

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

    GetClassVisitsResponse data, response status code and response headers



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
330
331
332
# File 'lib/swagger_client/api/class_api.rb', line 288

def class_get_class_visits_with_http_info(site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClassApi.class_get_class_visits ...'
  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 ClassApi.class_get_class_visits"
  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 ClassApi.class_get_class_visits"
  end
  # resource path
  local_var_path = '/public/v{version}/class/classvisits'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}
  query_params[:'request.classID'] = opts[:'request_class_id'] if !opts[:'request_class_id'].nil?
  query_params[:'request.lastModifiedDate'] = opts[:'request_last_modified_date'] if !opts[:'request_last_modified_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 => 'GetClassVisitsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClassApi#class_get_class_visits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#class_get_classes(site_id, version, opts = {}) ⇒ GetClassesResponse

Get scheduled classes.

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_class_description_ids (Array<Integer>)

    The requested class description IDs.

  • :request_class_ids (Array<Integer>)

    The requested class IDs.

  • :request_client_id (String)

    The client ID of the client who is viewing this class list. Based on identity, the client may be able to see additional information, such as membership specials.

  • :request_end_date_time (DateTime)

    The requested end date for filtering. &lt;br /&gt;Default: **today’s date**

  • :request_hide_canceled_classes (BOOLEAN)

    When &#x60;true&#x60;, canceled classes are removed from the response.&lt;br /&gt; When &#x60;false&#x60;, canceled classes are included in the response.&lt;br /&gt; Default: false

  • :request_last_modified_date (DateTime)

    When included in the request, only records modified on or after the &#x60;LastModifiedDate&#x60; specified are included in the response.

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_location_ids (Array<Integer>)

    A list of location IDs on which to base the search.

  • :request_offset (Integer)

    Page offset, defaults to 0.

  • :request_program_ids (Array<Integer>)

    A list of program IDs on which to base the search.

  • :request_scheduling_window (BOOLEAN)

    When &#x60;true&#x60;, classes outside scheduling window are removed from the response.&lt;br /&gt; When &#x60;false&#x60;, classes are included in the response, regardless of the scheduling window.&lt;br /&gt; Default: false

  • :request_semester_ids (Array<Integer>)

    A list of semester IDs on which to base the search.

  • :request_session_type_ids (Array<Integer>)

    A list of session type IDs on which to base the search.

  • :request_staff_ids (Array<Integer>)

    The requested IDs of the teaching staff members.

  • :request_start_date_time (DateTime)

    The requested start date for filtering. &lt;br /&gt;Default: **today’s date**

Returns:



354
355
356
357
# File 'lib/swagger_client/api/class_api.rb', line 354

def class_get_classes(site_id, version, opts = {})
  data, _status_code, _headers = class_get_classes_with_http_info(site_id, version, opts)
  data
end

#class_get_classes_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetClassesResponse, Fixnum, Hash)>

Get scheduled classes.

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_class_description_ids (Array<Integer>)

    The requested class description IDs.

  • :request_class_ids (Array<Integer>)

    The requested class IDs.

  • :request_client_id (String)

    The client ID of the client who is viewing this class list. Based on identity, the client may be able to see additional information, such as membership specials.

  • :request_end_date_time (DateTime)

    The requested end date for filtering. &lt;br /&gt;Default: **today’s date**

  • :request_hide_canceled_classes (BOOLEAN)

    When &#x60;true&#x60;, canceled classes are removed from the response.&lt;br /&gt; When &#x60;false&#x60;, canceled classes are included in the response.&lt;br /&gt; Default: false

  • :request_last_modified_date (DateTime)

    When included in the request, only records modified on or after the &#x60;LastModifiedDate&#x60; specified are included in the response.

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_location_ids (Array<Integer>)

    A list of location IDs on which to base the search.

  • :request_offset (Integer)

    Page offset, defaults to 0.

  • :request_program_ids (Array<Integer>)

    A list of program IDs on which to base the search.

  • :request_scheduling_window (BOOLEAN)

    When &#x60;true&#x60;, classes outside scheduling window are removed from the response.&lt;br /&gt; When &#x60;false&#x60;, classes are included in the response, regardless of the scheduling window.&lt;br /&gt; Default: false

  • :request_semester_ids (Array<Integer>)

    A list of semester IDs on which to base the search.

  • :request_session_type_ids (Array<Integer>)

    A list of session type IDs on which to base the search.

  • :request_staff_ids (Array<Integer>)

    The requested IDs of the teaching staff members.

  • :request_start_date_time (DateTime)

    The requested start date for filtering. &lt;br /&gt;Default: **today’s date**

Returns:

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

    GetClassesResponse data, response status code and response headers



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
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
# File 'lib/swagger_client/api/class_api.rb', line 380

def class_get_classes_with_http_info(site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClassApi.class_get_classes ...'
  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 ClassApi.class_get_classes"
  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 ClassApi.class_get_classes"
  end
  # resource path
  local_var_path = '/public/v{version}/class/classes'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}
  query_params[:'request.classDescriptionIds'] = @api_client.build_collection_param(opts[:'request_class_description_ids'], :multi) if !opts[:'request_class_description_ids'].nil?
  query_params[:'request.classIds'] = @api_client.build_collection_param(opts[:'request_class_ids'], :multi) if !opts[:'request_class_ids'].nil?
  query_params[:'request.clientId'] = opts[:'request_client_id'] if !opts[:'request_client_id'].nil?
  query_params[:'request.endDateTime'] = opts[:'request_end_date_time'] if !opts[:'request_end_date_time'].nil?
  query_params[:'request.hideCanceledClasses'] = opts[:'request_hide_canceled_classes'] if !opts[:'request_hide_canceled_classes'].nil?
  query_params[:'request.lastModifiedDate'] = opts[:'request_last_modified_date'] if !opts[:'request_last_modified_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.programIds'] = @api_client.build_collection_param(opts[:'request_program_ids'], :multi) if !opts[:'request_program_ids'].nil?
  query_params[:'request.schedulingWindow'] = opts[:'request_scheduling_window'] if !opts[:'request_scheduling_window'].nil?
  query_params[:'request.semesterIds'] = @api_client.build_collection_param(opts[:'request_semester_ids'], :multi) if !opts[:'request_semester_ids'].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.staffIds'] = @api_client.build_collection_param(opts[:'request_staff_ids'], :multi) if !opts[:'request_staff_ids'].nil?
  query_params[:'request.startDateTime'] = opts[:'request_start_date_time'] if !opts[:'request_start_date_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 => 'GetClassesResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClassApi#class_get_classes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#class_get_waitlist_entries(site_id, version, opts = {}) ⇒ GetWaitlistEntriesResponse

Get waiting list entries. Returns a list of waiting list entries for a specified class schedule or class. The request requires staff credentials and either a class schedule ID or class ID.

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_class_ids (Array<Integer>)

    The requested class IDs. If a class ID is present, the request automatically disregards any class schedule IDs in the request. &lt;br /&gt; Either &#x60;ClassScheduleIds&#x60;, &#x60;ClientIds&#x60;, &#x60;WaitlistEntryIds&#x60;, or &#x60;ClassIds&#x60; is required; the others become optional.&lt;br /&gt; Default: **all ClassIds**

  • :request_class_schedule_ids (Array<Integer>)

    The requested class schedule IDs. If a class ID is present, the request automatically disregards any class schedule IDs in the request.&lt;br /&gt; Either &#x60;ClassScheduleIds&#x60;, &#x60;ClientIds&#x60;, &#x60;WaitlistEntryIds&#x60;, or &#x60;ClassIds&#x60; is required; the others become optional.&lt;br /&gt; Default: **all ClassScheduleIds**

  • :request_client_ids (Array<String>)

    The requested client IDs.&lt;br /&gt; Either &#x60;ClassScheduleIds&#x60;, &#x60;ClientIds&#x60;, &#x60;WaitlistEntryIds&#x60;, or &#x60;ClassIds&#x60; is required; the others become optional.&lt;br /&gt; Default: **all ClientIds**

  • :request_hide_past_entries (BOOLEAN)

    When &#x60;true&#x60;, indicates that past waiting list entries are hidden from clients.&lt;br /&gt; When &#x60;false&#x60;, indicates that past entries are not hidden from clients.&lt;br /&gt; Default: false

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_offset (Integer)

    Page offset, defaults to 0.

  • :request_waitlist_entry_ids (Array<Integer>)

    The requested waiting list entry IDs.&lt;br /&gt; Either &#x60;ClassScheduleIds&#x60;, &#x60;ClientIds&#x60;, &#x60;WaitlistEntryIds&#x60;, or &#x60;ClassIds&#x60; is required; the others become optional.&lt;br /&gt; Default: **all WaitlistEntryIds**

Returns:



452
453
454
455
# File 'lib/swagger_client/api/class_api.rb', line 452

def class_get_waitlist_entries(site_id, version, opts = {})
  data, _status_code, _headers = class_get_waitlist_entries_with_http_info(site_id, version, opts)
  data
end

#class_get_waitlist_entries_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetWaitlistEntriesResponse, Fixnum, Hash)>

Get waiting list entries. Returns a list of waiting list entries for a specified class schedule or class. The request requires staff credentials and either a class schedule ID or class ID.

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_class_ids (Array<Integer>)

    The requested class IDs. If a class ID is present, the request automatically disregards any class schedule IDs in the request. &lt;br /&gt; Either &#x60;ClassScheduleIds&#x60;, &#x60;ClientIds&#x60;, &#x60;WaitlistEntryIds&#x60;, or &#x60;ClassIds&#x60; is required; the others become optional.&lt;br /&gt; Default: **all ClassIds**

  • :request_class_schedule_ids (Array<Integer>)

    The requested class schedule IDs. If a class ID is present, the request automatically disregards any class schedule IDs in the request.&lt;br /&gt; Either &#x60;ClassScheduleIds&#x60;, &#x60;ClientIds&#x60;, &#x60;WaitlistEntryIds&#x60;, or &#x60;ClassIds&#x60; is required; the others become optional.&lt;br /&gt; Default: **all ClassScheduleIds**

  • :request_client_ids (Array<String>)

    The requested client IDs.&lt;br /&gt; Either &#x60;ClassScheduleIds&#x60;, &#x60;ClientIds&#x60;, &#x60;WaitlistEntryIds&#x60;, or &#x60;ClassIds&#x60; is required; the others become optional.&lt;br /&gt; Default: **all ClientIds**

  • :request_hide_past_entries (BOOLEAN)

    When &#x60;true&#x60;, indicates that past waiting list entries are hidden from clients.&lt;br /&gt; When &#x60;false&#x60;, indicates that past entries are not hidden from clients.&lt;br /&gt; Default: false

  • :request_limit (Integer)

    Number of results to include, defaults to 100

  • :request_offset (Integer)

    Page offset, defaults to 0.

  • :request_waitlist_entry_ids (Array<Integer>)

    The requested waiting list entry IDs.&lt;br /&gt; Either &#x60;ClassScheduleIds&#x60;, &#x60;ClientIds&#x60;, &#x60;WaitlistEntryIds&#x60;, or &#x60;ClassIds&#x60; is required; the others become optional.&lt;br /&gt; Default: **all WaitlistEntryIds**

Returns:

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

    GetWaitlistEntriesResponse data, response status code and response headers



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
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
# File 'lib/swagger_client/api/class_api.rb', line 471

def class_get_waitlist_entries_with_http_info(site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClassApi.class_get_waitlist_entries ...'
  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 ClassApi.class_get_waitlist_entries"
  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 ClassApi.class_get_waitlist_entries"
  end
  # resource path
  local_var_path = '/public/v{version}/class/waitlistentries'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}
  query_params[:'request.classIds'] = @api_client.build_collection_param(opts[:'request_class_ids'], :multi) if !opts[:'request_class_ids'].nil?
  query_params[:'request.classScheduleIds'] = @api_client.build_collection_param(opts[:'request_class_schedule_ids'], :multi) if !opts[:'request_class_schedule_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.hidePastEntries'] = opts[:'request_hide_past_entries'] if !opts[:'request_hide_past_entries'].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.waitlistEntryIds'] = @api_client.build_collection_param(opts[:'request_waitlist_entry_ids'], :multi) if !opts[:'request_waitlist_entry_ids'].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 => 'GetWaitlistEntriesResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClassApi#class_get_waitlist_entries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#class_remove_client_from_class(request, site_id, version, opts = {}) ⇒ RemoveClientFromClassResponse

Remove a client from a class.

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:



528
529
530
531
# File 'lib/swagger_client/api/class_api.rb', line 528

def class_remove_client_from_class(request, site_id, version, opts = {})
  data, _status_code, _headers = class_remove_client_from_class_with_http_info(request, site_id, version, opts)
  data
end

#class_remove_client_from_class_with_http_info(request, site_id, version, opts = {}) ⇒ Array<(RemoveClientFromClassResponse, Fixnum, Hash)>

Remove a client from a class.

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:



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
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
# File 'lib/swagger_client/api/class_api.rb', line 540

def class_remove_client_from_class_with_http_info(request, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClassApi.class_remove_client_from_class ...'
  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 ClassApi.class_remove_client_from_class"
  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 ClassApi.class_remove_client_from_class"
  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 ClassApi.class_remove_client_from_class"
  end
  # resource path
  local_var_path = '/public/v{version}/class/removeclientfromclass'.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 => 'RemoveClientFromClassResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClassApi#class_remove_client_from_class\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#class_remove_from_waitlist(request_waitlist_entry_ids, site_id, version, opts = {}) ⇒ RemoveFromWaitlistResponse

Remove a client from a waiting list. This endpoint does not return a response. If a call to this endpoint results in a 200 OK HTTP status code, then the call was successful.

Parameters:

  • request_waitlist_entry_ids

    A list of waiting list IDs to remove from waiting lists.

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



597
598
599
600
# File 'lib/swagger_client/api/class_api.rb', line 597

def class_remove_from_waitlist(request_waitlist_entry_ids, site_id, version, opts = {})
  data, _status_code, _headers = class_remove_from_waitlist_with_http_info(request_waitlist_entry_ids, site_id, version, opts)
  data
end

#class_remove_from_waitlist_with_http_info(request_waitlist_entry_ids, site_id, version, opts = {}) ⇒ Array<(RemoveFromWaitlistResponse, Fixnum, Hash)>

Remove a client from a waiting list. This endpoint does not return a response. If a call to this endpoint results in a 200 OK HTTP status code, then the call was successful.

Parameters:

  • request_waitlist_entry_ids

    A list of waiting list IDs to remove from waiting lists.

  • 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<(RemoveFromWaitlistResponse, Fixnum, Hash)>)

    RemoveFromWaitlistResponse data, response status code and response headers



610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
# File 'lib/swagger_client/api/class_api.rb', line 610

def class_remove_from_waitlist_with_http_info(request_waitlist_entry_ids, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClassApi.class_remove_from_waitlist ...'
  end
  # verify the required parameter 'request_waitlist_entry_ids' is set
  if @api_client.config.client_side_validation && request_waitlist_entry_ids.nil?
    fail ArgumentError, "Missing the required parameter 'request_waitlist_entry_ids' when calling ClassApi.class_remove_from_waitlist"
  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 ClassApi.class_remove_from_waitlist"
  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 ClassApi.class_remove_from_waitlist"
  end
  # resource path
  local_var_path = '/public/v{version}/class/removefromwaitlist'.sub('{' + 'version' + '}', version.to_s)

  # query parameters
  query_params = {}
  query_params[:'request.waitlistEntryIds'] = @api_client.build_collection_param(request_waitlist_entry_ids, :multi)

  # 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(: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 => 'RemoveFromWaitlistResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClassApi#class_remove_from_waitlist\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#class_substitute_class_teacher(request, site_id, version, opts = {}) ⇒ SubstituteClassTeacherResponse

Substitute a class teacher.

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:



665
666
667
668
# File 'lib/swagger_client/api/class_api.rb', line 665

def class_substitute_class_teacher(request, site_id, version, opts = {})
  data, _status_code, _headers = class_substitute_class_teacher_with_http_info(request, site_id, version, opts)
  data
end

#class_substitute_class_teacher_with_http_info(request, site_id, version, opts = {}) ⇒ Array<(SubstituteClassTeacherResponse, Fixnum, Hash)>

Substitute a class teacher.

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:



677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
# File 'lib/swagger_client/api/class_api.rb', line 677

def class_substitute_class_teacher_with_http_info(request, site_id, version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ClassApi.class_substitute_class_teacher ...'
  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 ClassApi.class_substitute_class_teacher"
  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 ClassApi.class_substitute_class_teacher"
  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 ClassApi.class_substitute_class_teacher"
  end
  # resource path
  local_var_path = '/public/v{version}/class/substituteclassteacher'.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 => 'SubstituteClassTeacherResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ClassApi#class_substitute_class_teacher\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end