text: /**
   * Swirepay API
   * Swirepay REST APIs' are resource-oriented URLs that accept JSON-encoded request bodies, return JSON-encoded responses, and use standard HTTP response codes, authentication, and verbs. You can use the Swirepay API in test mode, which does not affect your live data or interact with the banking networks. The `API key` you use to authenticate the request determines whether the request is live mode or test mode.
   *
   * The version of the OpenAPI document: 1.0.0
   * Contact: apiteam@swirepay.com
   *
   * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
   * https://openapi-generator.tech
   * Do not edit the class manually.
   *
   */
  
  
  import ApiClient from "../ApiClient";
  import PaymentLinkListResponse from '../model/PaymentLinkListResponse';
  import PaymentLinkRequest from '../model/PaymentLinkRequest';
  import PaymentLinkResponse from '../model/PaymentLinkResponse';
  
  /**
  * PaymentLink service.
  * @module api/PaymentLinkApi
  * @version 1.0.0
  */
  export default class PaymentLinkApi {
  
      /**
      * Constructs a new PaymentLinkApi. 
      * @alias module:api/PaymentLinkApi
      * @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;
      }
  
  
      /**
       * Callback function to receive the result of the addPaymentLink operation.
       * @callback module:api/PaymentLinkApi~addPaymentLinkCallback
       * @param {String} error Error message, if any.
       * @param {module:model/PaymentLinkResponse} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * Add a new Payment Link
       * @param {module:model/PaymentLinkRequest} paymentLinkRequest 
       * @param {module:api/PaymentLinkApi~addPaymentLinkCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link module:model/PaymentLinkResponse}
       */
      addPaymentLink(paymentLinkRequest, callback) {
        let postBody = paymentLinkRequest;
        // verify the required parameter 'paymentLinkRequest' is set
        if (paymentLinkRequest === undefined || paymentLinkRequest === null) {
          throw new Error("Missing the required parameter 'paymentLinkRequest' when calling addPaymentLink");
        }
  
        let pathParams = {
        };
        let queryParams = {
        };
        let headerParams = {
        };
        let formParams = {
        };
  
        let authNames = ['api_key'];
        let contentTypes = ['application/json'];
        let accepts = ['application/json'];
        let returnType = PaymentLinkResponse;
        return this.apiClient.callApi(
          '/payment-link', 'POST',
          pathParams, queryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, null, callback
        );
      }
  
      /**
       * Callback function to receive the result of the cancelPaymentLinkByGid operation.
       * @callback module:api/PaymentLinkApi~cancelPaymentLinkByGidCallback
       * @param {String} error Error message, if any.
       * @param {module:model/PaymentLinkResponse} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * Get Payment Link by Gid
       * @param {String} gid 
       * @param {module:api/PaymentLinkApi~cancelPaymentLinkByGidCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link module:model/PaymentLinkResponse}
       */
      cancelPaymentLinkByGid(gid, callback) {
        let postBody = null;
        // verify the required parameter 'gid' is set
        if (gid === undefined || gid === null) {
          throw new Error("Missing the required parameter 'gid' when calling cancelPaymentLinkByGid");
        }
  
        let pathParams = {
          'gid': gid
        };
        let queryParams = {
        };
        let headerParams = {
        };
        let formParams = {
        };
  
        let authNames = ['api_key'];
        let contentTypes = [];
        let accepts = ['application/json'];
        let returnType = PaymentLinkResponse;
        return this.apiClient.callApi(
          '/payment-link/{gid}/cancel', 'PATCH',
          pathParams, queryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, null, callback
        );
      }
  
      /**
       * Callback function to receive the result of the getAllPaymentLink operation.
       * @callback module:api/PaymentLinkApi~getAllPaymentLinkCallback
       * @param {String} error Error message, if any.
       * @param {module:model/PaymentLinkListResponse} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * Get All payment Link
       * @param {Object} opts Optional parameters
       * @param {Number} opts.page 
       * @param {Number} opts.size 
       * @param {module:api/PaymentLinkApi~getAllPaymentLinkCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link module:model/PaymentLinkListResponse}
       */
      getAllPaymentLink(opts, callback) {
        opts = opts || {};
        let postBody = null;
  
        let pathParams = {
        };
        let queryParams = {
          'page': opts['page'],
          'size': opts['size']
        };
        let headerParams = {
        };
        let formParams = {
        };
  
        let authNames = ['api_key'];
        let contentTypes = [];
        let accepts = ['application/json'];
        let returnType = PaymentLinkListResponse;
        return this.apiClient.callApi(
          '/payment-link', 'GET',
          pathParams, queryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, null, callback
        );
      }
  
      /**
       * Callback function to receive the result of the getPaymentLinkByGid operation.
       * @callback module:api/PaymentLinkApi~getPaymentLinkByGidCallback
       * @param {String} error Error message, if any.
       * @param {module:model/PaymentLinkResponse} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * Get Payment Link by Gid
       * @param {String} gid 
       * @param {module:api/PaymentLinkApi~getPaymentLinkByGidCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link module:model/PaymentLinkResponse}
       */
      getPaymentLinkByGid(gid, callback) {
        let postBody = null;
        // verify the required parameter 'gid' is set
        if (gid === undefined || gid === null) {
          throw new Error("Missing the required parameter 'gid' when calling getPaymentLinkByGid");
        }
  
        let pathParams = {
          'gid': gid
        };
        let queryParams = {
        };
        let headerParams = {
        };
        let formParams = {
        };
  
        let authNames = ['api_key'];
        let contentTypes = [];
        let accepts = ['application/json'];
        let returnType = PaymentLinkResponse;
        return this.apiClient.callApi(
          '/payment-link/{gid}', 'GET',
          pathParams, queryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, null, callback
        );
      }
  
  
  }
  