HEX
Server: nginx/1.18.0
System: Linux test-ipsremont 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
User: ips (1000)
PHP: 8.0.30
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/fintechfuel/node_modules/pipedrive/dist/api/CurrenciesApi.js
"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
var _Currencies = _interopRequireDefault(require("../model/Currencies"));
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
/**
* Currencies service.
* @module api/CurrenciesApi
* @version 1.0.0
*/
var CurrenciesApi = /*#__PURE__*/function () {
  /**
  * Constructs a new CurrenciesApi. 
  * @alias module:api/CurrenciesApi
  * @class
  * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
  * default to {@link module:ApiClient#instance} if unspecified.
  */
  function CurrenciesApi(apiClient) {
    (0, _classCallCheck2["default"])(this, CurrenciesApi);
    this.apiClient = apiClient;
  }

  /**
   * Get all supported currencies
   * Returns all supported currencies in given account which should be used when saving monetary values with other objects. The `code` parameter of the returning objects is the currency code according to ISO 4217 for all non-custom currencies.
   * @param {Object} opts Optional parameters
   * @param {String} opts.term Optional search term that is searched for from currency's name and/or code
   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Currencies} and HTTP response
   */
  (0, _createClass2["default"])(CurrenciesApi, [{
    key: "getCurrenciesWithHttpInfo",
    value: function getCurrenciesWithHttpInfo(opts) {
      opts = opts || {};
      var postBody = null;
      var pathParams = {};
      var queryParams = {
        'term': opts['term'] === undefined ? opts['term'] : opts['term']
      };
      var headerParams = {};
      var formParams = {};
      var formParamArray = [];
      var contentTypes = [];
      var isURLEncoded = contentTypes.includes('application/x-www-form-urlencoded');
      var isJSON = contentTypes.includes('application/json');
      if (isJSON) {
        postBody = _objectSpread(_objectSpread({}, postBody), opts);
      } else if (isURLEncoded) {
        for (var key in opts) {
          if (opts.hasOwnProperty(key) && !formParamArray.includes(key)) {
            formParams[key] = opts[key];
          }
        }
      }
      var authNames = ['api_key', 'oauth2'];
      var accepts = ['application/json'];
      var returnType = _Currencies["default"];
      return this.apiClient.callApi('/currencies', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
    }

    /**
     * Get all supported currencies
     * Returns all supported currencies in given account which should be used when saving monetary values with other objects. The `code` parameter of the returning objects is the currency code according to ISO 4217 for all non-custom currencies.
     * @param {Object} opts Optional parameters
     * @param {String} opts.term Optional search term that is searched for from currency's name and/or code
     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Currencies}
     */
  }, {
    key: "getCurrencies",
    value: function getCurrencies(opts) {
      return this.getCurrenciesWithHttpInfo(opts).then(function (response_and_data) {
        return response_and_data;
      });
    }
  }]);
  return CurrenciesApi;
}();
exports["default"] = CurrenciesApi;