text: /*
   * SeminarCatalog API
   * Rest API for SeminarCatalog Administration
   *
   * OpenAPI spec version: 1.0.0
   * Contact: info@databay.de
   *
   * NOTE: This class is auto generated by the swagger code generator program.
   * https://github.com/swagger-api/swagger-codegen.git
   *
   * Swagger Codegen version: 2.4.12
   *
   * Do not edit the class manually.
   */
  
  import {ApiClient} from "../ApiClient";
  import {CouponCode} from '../model/CouponCode';
  import {CouponCodePaginationResult} from '../model/CouponCodePaginationResult';
  
  /**
  * CouponCode internal service.
  * @module internal/CouponCodeInternalApi
  * @version 1.0.0
  * @internal Don't use this class directly. Use the associated class located under the api/ folder.
  */
  export class CouponCodeInternalApi {
  
      /**
      * Constructs a new CouponCodeInternalApi. 
      * @alias module:internal/CouponCodeInternalApi
      * @class
      * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
      * default to {@link module:ApiClient#instance} if unspecified.
      */
      constructor(apiClient) {
          this.apiClient = apiClient || ApiClient.instance;
      }
  
  
  
      /**
       * SeminarCatalog\\Rest\\Resources\\Controller\\ResourceController::create
       * @param {module:model/CouponCode} couponCodePost 
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CouponCode} and HTTP response
       */
      couponcodeCreateWithHttpInfo(couponCodePost) {
        let postBody = couponCodePost;
  
        // verify the required parameter 'couponCodePost' is set
        if (couponCodePost === undefined || couponCodePost === null) {
          throw new Error("Missing the required parameter 'couponCodePost' when calling couponcodeCreate");
        }
  
  
        let pathParams = {
        };
        let queryParams = {
        };
        let headerParams = {
        };
        let formParams = {
        };
  
        let authNames = [];
        let contentTypes = [];
        let accepts = [];
        let returnType = CouponCode;
  
        return this.apiClient.callApi(
          '/api/couponcode', 'POST',
          pathParams, queryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType
        );
      }
  
      /**
       * SeminarCatalog\\Rest\\Resources\\Controller\\ResourceController::create
       * @param {module:model/CouponCode} couponCodePost 
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CouponCode}
       */
      couponcodeCreate(couponCodePost) {
        return this.couponcodeCreateWithHttpInfo(couponCodePost)
          .then(function(response_and_data) {
            return response_and_data.data;
          });
      }
  
  
      /**
       * SeminarCatalog\\Rest\\Resources\\Controller\\ResourceController::delete
       * @param {Number} id Numeric identifier for this resource
       * @param {Number} lng Numeric identifier for this resource
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CouponCode} and HTTP response
       */
      couponcodeDeleteWithHttpInfo(id, lng) {
        let postBody = null;
  
        // verify the required parameter 'id' is set
        if (id === undefined || id === null) {
          throw new Error("Missing the required parameter 'id' when calling couponcodeDelete");
        }
  
        // verify the required parameter 'lng' is set
        if (lng === undefined || lng === null) {
          throw new Error("Missing the required parameter 'lng' when calling couponcodeDelete");
        }
  
  
        let pathParams = {
          'id': id,
          'lng': lng
        };
        let queryParams = {
        };
        let headerParams = {
        };
        let formParams = {
        };
  
        let authNames = [];
        let contentTypes = [];
        let accepts = [];
        let returnType = CouponCode;
  
        return this.apiClient.callApi(
          '/api/couponcode/{id}/{lng}', 'DELETE',
          pathParams, queryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType
        );
      }
  
      /**
       * SeminarCatalog\\Rest\\Resources\\Controller\\ResourceController::delete
       * @param {Number} id Numeric identifier for this resource
       * @param {Number} lng Numeric identifier for this resource
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CouponCode}
       */
      couponcodeDelete(id, lng) {
        return this.couponcodeDeleteWithHttpInfo(id, lng)
          .then(function(response_and_data) {
            return response_and_data.data;
          });
      }
  
  
      /**
       * SeminarCatalog\\Rest\\Resources\\Controller\\ResourceController::get
       * @param {Number} id Numeric identifier for this resource
       * @param {Number} lng Numeric identifier for this resource
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CouponCode} and HTTP response
       */
      couponcodeGetWithHttpInfo(id, lng) {
        let postBody = null;
  
        // verify the required parameter 'id' is set
        if (id === undefined || id === null) {
          throw new Error("Missing the required parameter 'id' when calling couponcodeGet");
        }
  
        // verify the required parameter 'lng' is set
        if (lng === undefined || lng === null) {
          throw new Error("Missing the required parameter 'lng' when calling couponcodeGet");
        }
  
  
        let pathParams = {
          'id': id,
          'lng': lng
        };
        let queryParams = {
        };
        let headerParams = {
        };
        let formParams = {
        };
  
        let authNames = [];
        let contentTypes = [];
        let accepts = [];
        let returnType = CouponCode;
  
        return this.apiClient.callApi(
          '/api/couponcode/{id}/{lng}', 'GET',
          pathParams, queryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType
        );
      }
  
      /**
       * SeminarCatalog\\Rest\\Resources\\Controller\\ResourceController::get
       * @param {Number} id Numeric identifier for this resource
       * @param {Number} lng Numeric identifier for this resource
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CouponCode}
       */
      couponcodeGet(id, lng) {
        return this.couponcodeGetWithHttpInfo(id, lng)
          .then(function(response_and_data) {
            return response_and_data.data;
          });
      }
  
  
      /**
       * SeminarCatalog\\Rest\\Resources\\Controller\\ResourceController::list
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CouponCodePaginationResult} and HTTP response
       */
      couponcodeListWithHttpInfo() {
        let postBody = null;
  
  
        let pathParams = {
        };
        let queryParams = {
        };
        let headerParams = {
        };
        let formParams = {
        };
  
        let authNames = [];
        let contentTypes = [];
        let accepts = [];
        let returnType = CouponCodePaginationResult;
  
        return this.apiClient.callApi(
          '/api/couponcode', 'GET',
          pathParams, queryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType
        );
      }
  
      /**
       * SeminarCatalog\\Rest\\Resources\\Controller\\ResourceController::list
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CouponCodePaginationResult}
       */
      couponcodeList() {
        return this.couponcodeListWithHttpInfo()
          .then(function(response_and_data) {
            return response_and_data.data;
          });
      }
  
  
      /**
       * SeminarCatalog\\Rest\\Resources\\Controller\\ResourceController::update
       * @param {Number} id The resource identifier
       * @param {module:model/CouponCode} couponCodePut 
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CouponCode} and HTTP response
       */
      couponcodeUpdateWithHttpInfo(id, couponCodePut) {
        let postBody = couponCodePut;
  
        // verify the required parameter 'id' is set
        if (id === undefined || id === null) {
          throw new Error("Missing the required parameter 'id' when calling couponcodeUpdate");
        }
  
        // verify the required parameter 'couponCodePut' is set
        if (couponCodePut === undefined || couponCodePut === null) {
          throw new Error("Missing the required parameter 'couponCodePut' when calling couponcodeUpdate");
        }
  
  
        let pathParams = {
          'id': id
        };
        let queryParams = {
        };
        let headerParams = {
        };
        let formParams = {
        };
  
        let authNames = [];
        let contentTypes = [];
        let accepts = [];
        let returnType = CouponCode;
  
        return this.apiClient.callApi(
          '/api/couponcode/{id}', 'PUT',
          pathParams, queryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType
        );
      }
  
      /**
       * SeminarCatalog\\Rest\\Resources\\Controller\\ResourceController::update
       * @param {Number} id The resource identifier
       * @param {module:model/CouponCode} couponCodePut 
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CouponCode}
       */
      couponcodeUpdate(id, couponCodePut) {
        return this.couponcodeUpdateWithHttpInfo(id, couponCodePut)
          .then(function(response_and_data) {
            return response_and_data.data;
          });
      }
  
  
  }
  