Class: SwaggerClient::StaffApi
- Inherits:
-
Object
- Object
- SwaggerClient::StaffApi
- Defined in:
- lib/swagger_client/api/staff_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ StaffApi
constructor
A new instance of StaffApi.
-
#staff_get_staff(site_id, version, opts = {}) ⇒ GetStaffResponse
Get staff members at a site.
-
#staff_get_staff_permissions(request_staff_id, site_id, version, opts = {}) ⇒ GetStaffPermissionsResponse
Get configured staff permissions for a staff member.
-
#staff_get_staff_permissions_with_http_info(request_staff_id, site_id, version, opts = {}) ⇒ Array<(GetStaffPermissionsResponse, Fixnum, Hash)>
Get configured staff permissions for a staff member.
-
#staff_get_staff_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetStaffResponse, Fixnum, Hash)>
Get staff members at a site.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/swagger_client/api/staff_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#staff_get_staff(site_id, version, opts = {}) ⇒ GetStaffResponse
Get staff members at a site.
35 36 37 38 |
# 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 |
#staff_get_staff_permissions(request_staff_id, site_id, version, opts = {}) ⇒ GetStaffPermissionsResponse
Get configured staff permissions for a staff member.
110 111 112 113 |
# File 'lib/swagger_client/api/staff_api.rb', line 110 def (request_staff_id, site_id, version, opts = {}) data, _status_code, _headers = (request_staff_id, site_id, version, opts) data end |
#staff_get_staff_permissions_with_http_info(request_staff_id, site_id, version, opts = {}) ⇒ Array<(GetStaffPermissionsResponse, Fixnum, Hash)>
Get configured staff permissions for a staff member.
122 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 |
# File 'lib/swagger_client/api/staff_api.rb', line 122 def (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 |
#staff_get_staff_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetStaffResponse, Fixnum, Hash)>
Get staff members at a site.
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 92 93 94 95 96 97 98 99 100 101 102 |
# 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 |