class SwaggerClient::StaffApi
Attributes
Public Class Methods
# File lib/swagger_client/api/staff_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Get staff members at a site. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. (default to ) @option opts [Array<String>] :request_filters Filters to apply to the search. Possible values are: * StaffViewable * AppointmentInstructor * ClassInstructor * Male * Female @option opts [Integer] :request_limit Number of results to include, defaults to 100 @option opts [Integer] :request_location_id Return only staff members that are available at the specified location. You must supply a valid `SessionTypeID` and `StartDateTime` to use this parameter. @option opts [Integer] :request_offset Page offset, defaults to 0. @option opts [Integer] :request_session_type_id Return only staff members that are available for the specified session type. You must supply a valid `StartDateTime` and `LocationID` to use this parameter. @option opts [Array<Integer>] :request_staff_ids A list of the requested staff IDs. @option opts [DateTime] :request_start_date_time Return only staff members that are available at the specified date and time. You must supply a valid `SessionTypeID` and `LocationID` to use this parameter. @return [GetStaffResponse]
# File lib/swagger_client/api/staff_api.rb, line 35 def staff_get_staff(site_id, version, opts = {}) data, _status_code, _headers = staff_get_staff_with_http_info(site_id, version, opts) data end
Get configured staff permissions for a staff member. @param request_staff_id The ID of the staff member whose permissions you want to return. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. (default to ) @return [GetStaffPermissionsResponse]
# File lib/swagger_client/api/staff_api.rb, line 110 def staff_get_staff_permissions(request_staff_id, site_id, version, opts = {}) data, _status_code, _headers = staff_get_staff_permissions_with_http_info(request_staff_id, site_id, version, opts) data end
Get configured staff permissions for a staff member. @param request_staff_id The ID of the staff member whose permissions you want to return. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. @return [Array<(GetStaffPermissionsResponse
, Fixnum, Hash)>] GetStaffPermissionsResponse
data, response status code and response headers
# File lib/swagger_client/api/staff_api.rb, line 122 def staff_get_staff_permissions_with_http_info(request_staff_id, site_id, version, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: StaffApi.staff_get_staff_permissions ...' end # verify the required parameter 'request_staff_id' is set if @api_client.config.client_side_validation && request_staff_id.nil? fail ArgumentError, "Missing the required parameter 'request_staff_id' when calling StaffApi.staff_get_staff_permissions" 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 StaffApi.staff_get_staff_permissions" 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 StaffApi.staff_get_staff_permissions" end # resource path local_var_path = '/public/v{version}/staff/staffpermissions'.sub('{' + 'version' + '}', version.to_s) # query parameters query_params = {} query_params[:'request.staffId'] = request_staff_id # 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 => 'GetStaffPermissionsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: StaffApi#staff_get_staff_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get staff members at a site. @param site_id ID of the site from which to pull data. @param version @param [Hash] opts the optional parameters @option opts [String] :authorization A staff user authorization token. @option opts [Array<String>] :request_filters Filters to apply to the search. Possible values are: * StaffViewable * AppointmentInstructor * ClassInstructor * Male * Female @option opts [Integer] :request_limit Number of results to include, defaults to 100 @option opts [Integer] :request_location_id Return only staff members that are available at the specified location. You must supply a valid `SessionTypeID` and `StartDateTime` to use this parameter. @option opts [Integer] :request_offset Page offset, defaults to 0. @option opts [Integer] :request_session_type_id Return only staff members that are available for the specified session type. You must supply a valid `StartDateTime` and `LocationID` to use this parameter. @option opts [Array<Integer>] :request_staff_ids A list of the requested staff IDs. @option opts [DateTime] :request_start_date_time Return only staff members that are available at the specified date and time. You must supply a valid `SessionTypeID` and `LocationID` to use this parameter. @return [Array<(GetStaffResponse
, Fixnum, Hash)>] GetStaffResponse
data, response status code and response headers
# File lib/swagger_client/api/staff_api.rb, line 53 def staff_get_staff_with_http_info(site_id, version, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: StaffApi.staff_get_staff ...' 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 StaffApi.staff_get_staff" 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 StaffApi.staff_get_staff" end # resource path local_var_path = '/public/v{version}/staff/staff'.sub('{' + 'version' + '}', version.to_s) # query parameters query_params = {} query_params[:'request.filters'] = @api_client.build_collection_param(opts[:'request_filters'], :multi) if !opts[:'request_filters'].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.sessionTypeId'] = opts[:'request_session_type_id'] if !opts[:'request_session_type_id'].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 => 'GetStaffResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: StaffApi#staff_get_staff\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end