SubirTurno.js


/*
 * API para la gestión de turnos
 * Esta API se encarga de la gestión de los turnos para las secciones que estén activadas en 
 * los dispositivos que sean de tipo 'Expendedor'. Se podrá solicitar un nuevo turno para 
 * la sección seleccionada. Para ello mostrará las secciones que estén activadas para tal fin 
 * y los mostrará en pantalla con sus colores distintivos, nombre de la sección, el turno actual, etc. 
 * También podrá mostrar los turnos ya atendidos filtrando por fecha y turno, por rango de fechas, 
 * seccion, etc. Además, también se podrá mostrar los tickets expedidos pudiendo filtrar 
 * por rango de fechas, turno y fecha, sección, terminal, etc.
 *
 * OpenAPI spec version: 3.0.1
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 *
 * Swagger Codegen version: 3.0.51
 *
 * Do not edit the class manually.
 *
 */
import ApiClient from "../ApiClient";
import Model401 from '../model/Model401';
import Model404 from '../model/Model404';
import Model405 from '../model/Model405';
import Model422 from '../model/Model422';
import Model500 from '../model/Model500';
import Model503 from '../model/Model503';
import RespuestaOkSubirTurno from '../model/RespuestaOkSubirTurno';

/**
* SubirTurno service.
* @module api/SubirTurnoApi
* @version 3.0.1
*/
export default class SubirTurnoApi {

    /**
    * Constructs a new SubirTurnoApi. 
    * @alias module:api/SubirTurnoApi
    * @class
    * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
    * default to {@link module:ApiClient#instanc
    e} if unspecified.
    */
    constructor(apiClient) {
        this.apiClient = apiClient || ApiClient.instance;
    }

    /**
     * Callback function to receive the result of the subirTurnoGet operation.
     * @callback moduleapi/SubirTurnoApi~subirTurnoGetCallback
     * @param {String} error Error message, if any.
     * @param {module:model/RespuestaOkSubirTurno{ data The data returned by the service call.
     * @param {String} response The complete HTTP response.
     */

    /**
     * Comprueba si hay disponible algún turno de la sección enviada
     * Comprueba en la BD si hay disponible algún turno para la sección que el usuario requiere. 
	 * Si la hay la devolverá, sino devolverá un mensaje de feedback.
     * @param {String} authorization Token de autenticación.
     * @param {String} seccion Sección requerida
     * @param {Object} opts Optional parameters
     * @param {Number} opts.totalcounter Sección requerida
     * @param {module:api/SubirTurnoApi~subirTurnoGetCallback} callback The callback function, 
	 * accepting three arguments: error, data, response
     * data is of type: {@link <&vendorExtensions.x-jsdoc-type>}
     */
    subirTurnoGet(authorization, seccion, opts, callback) {
      opts = opts || {};
      let postBody = null;
      // verify the required parameter 'authorization' is set
      if (authorization === undefined || authorization === null) {
        throw new Error("Missing the required parameter 'authorization' when calling subirTurnoGet");
      }
      // verify the required parameter 'seccion' is set
      if (seccion === undefined || seccion === null) {
        throw new Error("Missing the required parameter 'seccion' when calling subirTurnoGet");
      }

      let pathParams = {
        
      };
      let queryParams = {
        'seccion': seccion,'totalcounter': opts['totalcounter']
      };
      let headerParams = {
        'Authorization': authorization
      };
      let formParams = {
        
      };

      let authNames = ['Authorization'];
      let contentTypes = [];
      let accepts = ['application/json'];
      let returnType = RespuestaOkSubirTurno;

      return this.apiClient.callApi(
        '/subirTurno', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, callback
      );
    }
}