text: /**
   * Hydrogen Nucleus API
   * The Hydrogen Nucleus API
   *
   * OpenAPI spec version: 1.9.4
   * Contact: info@hydrogenplatform.com
   *
   * NOTE: This class is auto generated by the swagger code generator program.
   * https://github.com/swagger-api/swagger-codegen.git
   *
   * Swagger Codegen version: 2.2.3
   *
   * Do not edit the class manually.
   *
   */
  
  (function(root, factory) {
    if (typeof define === 'function' && define.amd) {
      // AMD. Register as an anonymous module.
      define(['ApiClient', 'model/Card', 'model/CardProgram', 'model/PageCard', 'model/PageCardProgram', 'model/PageClientCardVO', 'model/PagePortfolioTransaction'], factory);
    } else if (typeof module === 'object' && module.exports) {
      // CommonJS-like environments that support module.exports, like Node.
      module.exports = factory(require('../ApiClient'), require('../model/Card'), require('../model/CardProgram'), require('../model/PageCard'), require('../model/PageCardProgram'), require('../model/PageClientCardVO'), require('../model/PagePortfolioTransaction'));
    } else {
      // Browser globals (root is window)
      if (!root.HydrogenNucleusApi) {
        root.HydrogenNucleusApi = {};
      }
      root.HydrogenNucleusApi.CardApi = factory(root.HydrogenNucleusApi.ApiClient, root.HydrogenNucleusApi.Card, root.HydrogenNucleusApi.CardProgram, root.HydrogenNucleusApi.PageCard, root.HydrogenNucleusApi.PageCardProgram, root.HydrogenNucleusApi.PageClientCardVO, root.HydrogenNucleusApi.PagePortfolioTransaction);
    }
  }(this, function(ApiClient, Card, CardProgram, PageCard, PageCardProgram, PageClientCardVO, PagePortfolioTransaction) {
    'use strict';
  
    /**
     * Card service.
     * @module api/CardApi
     * @version 1.9.4
     */
  
    /**
     * Constructs a new CardApi. 
     * @alias module:api/CardApi
     * @class
     * @param {module:ApiClient} apiClient Optional API client implementation to use,
     * default to {@link module:ApiClient#instance} if unspecified.
     */
    var exports = function(apiClient) {
      this.apiClient = apiClient || ApiClient.instance;
  
  
      /**
       * Callback function to receive the result of the createCardProgramUsingPost operation.
       * @callback module:api/CardApi~createCardProgramUsingPostCallback
       * @param {String} error Error message, if any.
       * @param {module:model/CardProgram} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * Create a cardProgram request
       * Create a new cardProgram request.
       * @param {module:model/CardProgram} cardProgramRequest cardProgramRequest
       * @param {module:api/CardApi~createCardProgramUsingPostCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link module:model/CardProgram}
       */
      this.createCardProgramUsingPost = function(cardProgramRequest, callback) {
        var postBody = cardProgramRequest;
  
        // verify the required parameter 'cardProgramRequest' is set
        if (cardProgramRequest === undefined || cardProgramRequest === null) {
          throw new Error("Missing the required parameter 'cardProgramRequest' when calling createCardProgramUsingPost");
        }
  
  
        var pathParams = {
        };
        var queryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['oauth2'];
        var contentTypes = ['application/json'];
        var accepts = ['*/*'];
        var returnType = CardProgram;
  
        return this.apiClient.callApi(
          '/nucleus/v1/card_program', 'POST',
          pathParams, queryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the createCardUsingPost operation.
       * @callback module:api/CardApi~createCardUsingPostCallback
       * @param {String} error Error message, if any.
       * @param {module:model/Card} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * Create a card request
       * Create a new card request.
       * @param {module:model/Card} cardRequest cardRequest
       * @param {module:api/CardApi~createCardUsingPostCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link module:model/Card}
       */
      this.createCardUsingPost = function(cardRequest, callback) {
        var postBody = cardRequest;
  
        // verify the required parameter 'cardRequest' is set
        if (cardRequest === undefined || cardRequest === null) {
          throw new Error("Missing the required parameter 'cardRequest' when calling createCardUsingPost");
        }
  
  
        var pathParams = {
        };
        var queryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['oauth2'];
        var contentTypes = ['application/json'];
        var accepts = ['*/*'];
        var returnType = Card;
  
        return this.apiClient.callApi(
          '/nucleus/v1/card', 'POST',
          pathParams, queryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the deleteCardProgramUsingDelete operation.
       * @callback module:api/CardApi~deleteCardProgramUsingDeleteCallback
       * @param {String} error Error message, if any.
       * @param data This operation does not return a value.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * Delete an cardProgram
       * Permanently delete an cardProgram.
       * @param {String} cardProgramId UUID card_program_id
       * @param {module:api/CardApi~deleteCardProgramUsingDeleteCallback} callback The callback function, accepting three arguments: error, data, response
       */
      this.deleteCardProgramUsingDelete = function(cardProgramId, callback) {
        var postBody = null;
  
        // verify the required parameter 'cardProgramId' is set
        if (cardProgramId === undefined || cardProgramId === null) {
          throw new Error("Missing the required parameter 'cardProgramId' when calling deleteCardProgramUsingDelete");
        }
  
  
        var pathParams = {
          'card_program_id': cardProgramId
        };
        var queryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['oauth2'];
        var contentTypes = [];
        var accepts = ['*/*'];
        var returnType = null;
  
        return this.apiClient.callApi(
          '/nucleus/v1/card_program/{card_program_id}', 'DELETE',
          pathParams, queryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the deleteCardUsingDelete operation.
       * @callback module:api/CardApi~deleteCardUsingDeleteCallback
       * @param {String} error Error message, if any.
       * @param data This operation does not return a value.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * Delete a card request
       * Permanently delete a card request.
       * @param {String} cardId UUID card_id
       * @param {module:api/CardApi~deleteCardUsingDeleteCallback} callback The callback function, accepting three arguments: error, data, response
       */
      this.deleteCardUsingDelete = function(cardId, callback) {
        var postBody = null;
  
        // verify the required parameter 'cardId' is set
        if (cardId === undefined || cardId === null) {
          throw new Error("Missing the required parameter 'cardId' when calling deleteCardUsingDelete");
        }
  
  
        var pathParams = {
          'card_id': cardId
        };
        var queryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['oauth2'];
        var contentTypes = [];
        var accepts = ['*/*'];
        var returnType = null;
  
        return this.apiClient.callApi(
          '/nucleus/v1/card/{card_id}', 'DELETE',
          pathParams, queryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the getAllClientCardsUsingGet operation.
       * @callback module:api/CardApi~getAllClientCardsUsingGetCallback
       * @param {String} error Error message, if any.
       * @param {module:model/PageClientCardVO} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * List all client cards
       * Get the information for all cards for an client.
       * @param {Object} opts Optional parameters
       * @param {Boolean} opts.ascending ascending (default to false)
       * @param {String} opts.currencyConversion USD
       * @param {String} opts.filter filter
       * @param {String} opts.orderBy order_by (default to update_date)
       * @param {Number} opts.page page (default to 0)
       * @param {Number} opts.size size (default to 25)
       * @param {module:api/CardApi~getAllClientCardsUsingGetCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link module:model/PageClientCardVO}
       */
      this.getAllClientCardsUsingGet = function(opts, callback) {
        opts = opts || {};
        var postBody = null;
  
  
        var pathParams = {
        };
        var queryParams = {
          'ascending': opts['ascending'],
          'currency_conversion': opts['currencyConversion'],
          'filter': opts['filter'],
          'order_by': opts['orderBy'],
          'page': opts['page'],
          'size': opts['size']
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['oauth2'];
        var contentTypes = [];
        var accepts = ['*/*'];
        var returnType = PageClientCardVO;
  
        return this.apiClient.callApi(
          '/nucleus/v1/card/cardholder_overview', 'GET',
          pathParams, queryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the getCardAllUsingGet operation.
       * @callback module:api/CardApi~getCardAllUsingGetCallback
       * @param {String} error Error message, if any.
       * @param {module:model/PageCard} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * List all card requests
       * Get the information for all card requests.
       * @param {Object} opts Optional parameters
       * @param {Boolean} opts.ascending ascending (default to false)
       * @param {String} opts.filter filter
       * @param {String} opts.orderBy order_by (default to update_date)
       * @param {Number} opts.page page (default to 0)
       * @param {Number} opts.size size (default to 25)
       * @param {module:api/CardApi~getCardAllUsingGetCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link module:model/PageCard}
       */
      this.getCardAllUsingGet = function(opts, callback) {
        opts = opts || {};
        var postBody = null;
  
  
        var pathParams = {
        };
        var queryParams = {
          'ascending': opts['ascending'],
          'filter': opts['filter'],
          'order_by': opts['orderBy'],
          'page': opts['page'],
          'size': opts['size']
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['oauth2'];
        var contentTypes = [];
        var accepts = ['*/*'];
        var returnType = PageCard;
  
        return this.apiClient.callApi(
          '/nucleus/v1/card', 'GET',
          pathParams, queryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the getCardAssetSizeAggAllUsingGet operation.
       * @callback module:api/CardApi~getCardAssetSizeAggAllUsingGetCallback
       * @param {String} error Error message, if any.
       * @param {Array.<Object>} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * List all card asset sizes
       * Get a list of asset sizes by date for an card.
       * @param {String} cardId Card Id
       * @param {Object} opts Optional parameters
       * @param {String} opts.currencyConversion USD
       * @param {Date} opts.endDate end date
       * @param {Boolean} opts.getLatest true or false
       * @param {String} opts.sortType  Quarter (Q), Monthly (M) , Annually (Y), Daily (D) --caps matter, codes in ()
       * @param {Date} opts.startDate start date
       * @param {module:api/CardApi~getCardAssetSizeAggAllUsingGetCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link Array.<Object>}
       */
      this.getCardAssetSizeAggAllUsingGet = function(cardId, opts, callback) {
        opts = opts || {};
        var postBody = null;
  
        // verify the required parameter 'cardId' is set
        if (cardId === undefined || cardId === null) {
          throw new Error("Missing the required parameter 'cardId' when calling getCardAssetSizeAggAllUsingGet");
        }
  
  
        var pathParams = {
          'card_id': cardId
        };
        var queryParams = {
          'currency_conversion': opts['currencyConversion'],
          'end_date': opts['endDate'],
          'get_latest': opts['getLatest'],
          'sort_type': opts['sortType'],
          'start_date': opts['startDate']
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['oauth2'];
        var contentTypes = [];
        var accepts = ['*/*'];
        var returnType = [Object];
  
        return this.apiClient.callApi(
          '/nucleus/v1/card/{card_id}/asset_size', 'GET',
          pathParams, queryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the getCardProgramAllUsingGet operation.
       * @callback module:api/CardApi~getCardProgramAllUsingGetCallback
       * @param {String} error Error message, if any.
       * @param {module:model/PageCardProgram} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * List all cardProgram
       * Get information for all cardProgram.
       * @param {Object} opts Optional parameters
       * @param {Boolean} opts.ascending ascending (default to false)
       * @param {String} opts.filter filter
       * @param {String} opts.orderBy order_by (default to update_date)
       * @param {Number} opts.page page (default to 0)
       * @param {Number} opts.size size (default to 25)
       * @param {module:api/CardApi~getCardProgramAllUsingGetCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link module:model/PageCardProgram}
       */
      this.getCardProgramAllUsingGet = function(opts, callback) {
        opts = opts || {};
        var postBody = null;
  
  
        var pathParams = {
        };
        var queryParams = {
          'ascending': opts['ascending'],
          'filter': opts['filter'],
          'order_by': opts['orderBy'],
          'page': opts['page'],
          'size': opts['size']
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['oauth2'];
        var contentTypes = [];
        var accepts = ['*/*'];
        var returnType = PageCardProgram;
  
        return this.apiClient.callApi(
          '/nucleus/v1/card_program', 'GET',
          pathParams, queryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the getCardProgramUsingGet operation.
       * @callback module:api/CardApi~getCardProgramUsingGetCallback
       * @param {String} error Error message, if any.
       * @param {module:model/CardProgram} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * Retrieve an cardProgram
       * Retrieve the information for a specific cardProgram.
       * @param {String} cardProgramId UUID card_program_id
       * @param {module:api/CardApi~getCardProgramUsingGetCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link module:model/CardProgram}
       */
      this.getCardProgramUsingGet = function(cardProgramId, callback) {
        var postBody = null;
  
        // verify the required parameter 'cardProgramId' is set
        if (cardProgramId === undefined || cardProgramId === null) {
          throw new Error("Missing the required parameter 'cardProgramId' when calling getCardProgramUsingGet");
        }
  
  
        var pathParams = {
          'card_program_id': cardProgramId
        };
        var queryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['oauth2'];
        var contentTypes = [];
        var accepts = ['*/*'];
        var returnType = CardProgram;
  
        return this.apiClient.callApi(
          '/nucleus/v1/card_program/{card_program_id}', 'GET',
          pathParams, queryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the getCardTransactionAggAllUsingGet operation.
       * @callback module:api/CardApi~getCardTransactionAggAllUsingGetCallback
       * @param {String} error Error message, if any.
       * @param {module:model/PagePortfolioTransaction} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * List all card transactions
       * Get the information for all transactions for an card.
       * @param {String} cardId UUID card_id
       * @param {Object} opts Optional parameters
       * @param {Boolean} opts.ascending ascending (default to false)
       * @param {String} opts.currencyConversion USD
       * @param {Date} opts.endDate end date
       * @param {String} opts.filter filter
       * @param {String} opts.orderBy order_by (default to update_date)
       * @param {Number} opts.page page (default to 0)
       * @param {Number} opts.size size (default to 25)
       * @param {Date} opts.startDate start date
       * @param {module:api/CardApi~getCardTransactionAggAllUsingGetCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link module:model/PagePortfolioTransaction}
       */
      this.getCardTransactionAggAllUsingGet = function(cardId, opts, callback) {
        opts = opts || {};
        var postBody = null;
  
        // verify the required parameter 'cardId' is set
        if (cardId === undefined || cardId === null) {
          throw new Error("Missing the required parameter 'cardId' when calling getCardTransactionAggAllUsingGet");
        }
  
  
        var pathParams = {
          'card_id': cardId
        };
        var queryParams = {
          'ascending': opts['ascending'],
          'currency_conversion': opts['currencyConversion'],
          'end_date': opts['endDate'],
          'filter': opts['filter'],
          'order_by': opts['orderBy'],
          'page': opts['page'],
          'size': opts['size'],
          'start_date': opts['startDate']
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['oauth2'];
        var contentTypes = [];
        var accepts = ['*/*'];
        var returnType = PagePortfolioTransaction;
  
        return this.apiClient.callApi(
          '/nucleus/v1/card/{card_id}/transaction', 'GET',
          pathParams, queryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the getCardUsingGet operation.
       * @callback module:api/CardApi~getCardUsingGetCallback
       * @param {String} error Error message, if any.
       * @param {module:model/Card} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * Retrieve a card request
       * Retrieve the information for a card request.
       * @param {String} cardId UUID card_id
       * @param {module:api/CardApi~getCardUsingGetCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link module:model/Card}
       */
      this.getCardUsingGet = function(cardId, callback) {
        var postBody = null;
  
        // verify the required parameter 'cardId' is set
        if (cardId === undefined || cardId === null) {
          throw new Error("Missing the required parameter 'cardId' when calling getCardUsingGet");
        }
  
  
        var pathParams = {
          'card_id': cardId
        };
        var queryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['oauth2'];
        var contentTypes = [];
        var accepts = ['*/*'];
        var returnType = Card;
  
        return this.apiClient.callApi(
          '/nucleus/v1/card/{card_id}', 'GET',
          pathParams, queryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the updateCardProgramUsingPut operation.
       * @callback module:api/CardApi~updateCardProgramUsingPutCallback
       * @param {String} error Error message, if any.
       * @param {module:model/CardProgram} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * Update an cardProgram
       * Update the information for an cardProgram.
       * @param {module:model/CardProgram} cardProgram card_program
       * @param {String} cardProgramId UUID card_program_id
       * @param {module:api/CardApi~updateCardProgramUsingPutCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link module:model/CardProgram}
       */
      this.updateCardProgramUsingPut = function(cardProgram, cardProgramId, callback) {
        var postBody = cardProgram;
  
        // verify the required parameter 'cardProgram' is set
        if (cardProgram === undefined || cardProgram === null) {
          throw new Error("Missing the required parameter 'cardProgram' when calling updateCardProgramUsingPut");
        }
  
        // verify the required parameter 'cardProgramId' is set
        if (cardProgramId === undefined || cardProgramId === null) {
          throw new Error("Missing the required parameter 'cardProgramId' when calling updateCardProgramUsingPut");
        }
  
  
        var pathParams = {
          'card_program_id': cardProgramId
        };
        var queryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['oauth2'];
        var contentTypes = ['application/json'];
        var accepts = ['*/*'];
        var returnType = CardProgram;
  
        return this.apiClient.callApi(
          '/nucleus/v1/card_program/{card_program_id}', 'PUT',
          pathParams, queryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the updateCardUsingPut operation.
       * @callback module:api/CardApi~updateCardUsingPutCallback
       * @param {String} error Error message, if any.
       * @param {module:model/Card} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * Update a card request
       * Update the information for a card request.
       * @param {module:model/Card} card card
       * @param {String} cardId UUID card_id
       * @param {module:api/CardApi~updateCardUsingPutCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link module:model/Card}
       */
      this.updateCardUsingPut = function(card, cardId, callback) {
        var postBody = card;
  
        // verify the required parameter 'card' is set
        if (card === undefined || card === null) {
          throw new Error("Missing the required parameter 'card' when calling updateCardUsingPut");
        }
  
        // verify the required parameter 'cardId' is set
        if (cardId === undefined || cardId === null) {
          throw new Error("Missing the required parameter 'cardId' when calling updateCardUsingPut");
        }
  
  
        var pathParams = {
          'card_id': cardId
        };
        var queryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = ['oauth2'];
        var contentTypes = ['application/json'];
        var accepts = ['*/*'];
        var returnType = Card;
  
        return this.apiClient.callApi(
          '/nucleus/v1/card/{card_id}', 'PUT',
          pathParams, queryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
    };
  
    return exports;
  }));
  