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/model/SubscriptionRecurringCreateRequest.js
"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
/**
 * Pipedrive API v1
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 *
 */
/**
 * The SubscriptionRecurringCreateRequest model module.
 * @module model/SubscriptionRecurringCreateRequest
 * @version 1.0.0
 */
var SubscriptionRecurringCreateRequest = /*#__PURE__*/function () {
  /**
   * Constructs a new <code>SubscriptionRecurringCreateRequest</code>.
   * @alias module:model/SubscriptionRecurringCreateRequest
   * @param dealId {Number} The ID of the deal this recurring subscription is associated with
   * @param currency {String} The currency of the recurring subscription. Accepts a 3-character currency code.
   * @param cadenceType {module:model/SubscriptionRecurringCreateRequest.CadenceTypeEnum} The interval between payments
   * @param cycleAmount {Number} The amount of each payment
   * @param startDate {Date} The start date of the recurring subscription. Format: YYYY-MM-DD
   */
  function SubscriptionRecurringCreateRequest(dealId, currency, cadenceType, cycleAmount, startDate) {
    (0, _classCallCheck2["default"])(this, SubscriptionRecurringCreateRequest);
    SubscriptionRecurringCreateRequest.initialize(this, dealId, currency, cadenceType, cycleAmount, startDate);
  }

  /**
   * Initializes the fields of this object.
   * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
   * Only for internal use.
   */
  (0, _createClass2["default"])(SubscriptionRecurringCreateRequest, null, [{
    key: "initialize",
    value: function initialize(obj, dealId, currency, cadenceType, cycleAmount, startDate) {
      obj['deal_id'] = dealId;
      obj['currency'] = currency;
      obj['cadence_type'] = cadenceType;
      obj['cycle_amount'] = cycleAmount;
      obj['start_date'] = startDate;
    }

    /**
     * Constructs a <code>SubscriptionRecurringCreateRequest</code> from a plain JavaScript object, optionally creating a new instance.
     * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
     * @param {Object} data The plain JavaScript object bearing properties of interest.
     * @param {module:model/SubscriptionRecurringCreateRequest} obj Optional instance to populate.
     * @return {module:model/SubscriptionRecurringCreateRequest} The populated <code>SubscriptionRecurringCreateRequest</code> instance.
     */
  }, {
    key: "constructFromObject",
    value: function constructFromObject(data, obj) {
      if (data) {
        obj = obj || new SubscriptionRecurringCreateRequest();
        if (data.hasOwnProperty('deal_id')) {
          obj['deal_id'] = _ApiClient["default"].convertToType(data['deal_id'], 'Number');
          delete data['deal_id'];
        }
        if (data.hasOwnProperty('currency')) {
          obj['currency'] = _ApiClient["default"].convertToType(data['currency'], 'String');
          delete data['currency'];
        }
        if (data.hasOwnProperty('description')) {
          obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
          delete data['description'];
        }
        if (data.hasOwnProperty('cadence_type')) {
          obj['cadence_type'] = _ApiClient["default"].convertToType(data['cadence_type'], 'String');
          delete data['cadence_type'];
        }
        if (data.hasOwnProperty('cycles_count')) {
          obj['cycles_count'] = _ApiClient["default"].convertToType(data['cycles_count'], 'Number');
          delete data['cycles_count'];
        }
        if (data.hasOwnProperty('cycle_amount')) {
          obj['cycle_amount'] = _ApiClient["default"].convertToType(data['cycle_amount'], 'Number');
          delete data['cycle_amount'];
        }
        if (data.hasOwnProperty('start_date')) {
          obj['start_date'] = _ApiClient["default"].convertToType(data['start_date'], 'Date');
          delete data['start_date'];
        }
        if (data.hasOwnProperty('infinite')) {
          obj['infinite'] = _ApiClient["default"].convertToType(data['infinite'], 'Boolean');
          delete data['infinite'];
        }
        if (data.hasOwnProperty('payments')) {
          obj['payments'] = _ApiClient["default"].convertToType(data['payments'], [Object]);
          delete data['payments'];
        }
        if (data.hasOwnProperty('update_deal_value')) {
          obj['update_deal_value'] = _ApiClient["default"].convertToType(data['update_deal_value'], 'Boolean');
          delete data['update_deal_value'];
        }
        if (Object.keys(data).length > 0) {
          Object.assign(obj, data);
        }
      }
      return obj;
    }
  }]);
  return SubscriptionRecurringCreateRequest;
}();
/**
 * The ID of the deal this recurring subscription is associated with
 * @member {Number} deal_id
 */
SubscriptionRecurringCreateRequest.prototype['deal_id'] = undefined;

/**
 * The currency of the recurring subscription. Accepts a 3-character currency code.
 * @member {String} currency
 */
SubscriptionRecurringCreateRequest.prototype['currency'] = undefined;

/**
 * The description of the recurring subscription
 * @member {String} description
 */
SubscriptionRecurringCreateRequest.prototype['description'] = undefined;

/**
 * The interval between payments
 * @member {module:model/SubscriptionRecurringCreateRequest.CadenceTypeEnum} cadence_type
 */
SubscriptionRecurringCreateRequest.prototype['cadence_type'] = undefined;

/**
 * Shows how many payments the subscription has. Note that one field must be set: `cycles_count` or `infinite`. If `cycles_count` is set, then `cycle_amount` and `start_date` are also required.
 * @member {Number} cycles_count
 */
SubscriptionRecurringCreateRequest.prototype['cycles_count'] = undefined;

/**
 * The amount of each payment
 * @member {Number} cycle_amount
 */
SubscriptionRecurringCreateRequest.prototype['cycle_amount'] = undefined;

/**
 * The start date of the recurring subscription. Format: YYYY-MM-DD
 * @member {Date} start_date
 */
SubscriptionRecurringCreateRequest.prototype['start_date'] = undefined;

/**
 * This indicates that the recurring subscription will last until it's manually canceled or deleted. Note that only one field must be set: `cycles_count` or `infinite`.
 * @member {Boolean} infinite
 */
SubscriptionRecurringCreateRequest.prototype['infinite'] = undefined;

/**
 * Array of additional payments. It requires a minimum structure as follows: [{ amount:SUM, description:DESCRIPTION, due_at:PAYMENT_DATE }]. Replace SUM with a payment amount, DESCRIPTION with an explanation string, PAYMENT_DATE with a date (format YYYY-MM-DD).
 * @member {Array.<Object>} payments
 */
SubscriptionRecurringCreateRequest.prototype['payments'] = undefined;

/**
 * Indicates that the deal value must be set to recurring subscription's MRR value
 * @member {Boolean} update_deal_value
 */
SubscriptionRecurringCreateRequest.prototype['update_deal_value'] = undefined;

/**
 * Allowed values for the <code>cadence_type</code> property.
 * @enum {String}
 * @readonly
 */
SubscriptionRecurringCreateRequest['CadenceTypeEnum'] = {
  /**
   * value: "weekly"
   * @const
   */
  "weekly": "weekly",
  /**
   * value: "monthly"
   * @const
   */
  "monthly": "monthly",
  /**
   * value: "quarterly"
   * @const
   */
  "quarterly": "quarterly",
  /**
   * value: "yearly"
   * @const
   */
  "yearly": "yearly"
};
var _default = SubscriptionRecurringCreateRequest;
exports["default"] = _default;