Autoconsumo.js
/*
* API DOLLY
* Dolly es un gestor de imagenes para campañas de marketing para el sector retail. Esta API será la encargada
* de facilitar las acciones del aplicativo interaccionando con el servidor, aportando así, una capa de seguridad.
*
* OpenAPI spec version: 1.0.1
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
import ApiClient from "../ApiClient";
import AutoconsumoBody from '../model/AutoconsumoBody';
import Model400 from '../model/Model400';
import Model401 from '../model/Model401';
import Model404 from '../model/Model404';
import Model405 from '../model/Model405';
import Model409 from '../model/Model409';
import Model422 from '../model/Model422';
import Model500 from '../model/Model500';
import Model503 from '../model/Model503';
/**
* Autoconsumo service.
* @module api/AutoconsumoApi
* @version 1.0.1
*/
export default class AutoconsumoApi {
/**
* Constructs a new AutoconsumoApi.
* @alias module:api/AutoconsumoApi
* @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 autoconsumoPost operation.
* @callback moduleapi/AutoconsumoApi~autoconsumoPostCallback
* @param {String} error Error message, if any.
* @param {Object{ data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Obtiene las imagenes solicitadas según el filtro aplicado.
* El endpoint devuelve las imagenes solicitadas según el ID de autoconsumo del articulo introducido
* y el tipo de filtro que se quiere aplicar.
* @param {module:model/AutoconsumoBody} body
* @param {module:api/AutoconsumoApi~autoconsumoPostCallback} callback The callback function,
* accepting three arguments: error, data, response
* data is of type: {@link <&vendorExtensions.x-jsdoc-type>}
*/
autoconsumoPost(body, callback) {
let postBody = body;
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling autoconsumoPost");
}
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['Authorization'];
let contentTypes = ['application/json'];
let accepts = ['application/json'];
let returnType = Object;
return this.apiClient.callApi(
'/autoconsumo', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
}