(function(root, factory) {
  if (typeof define === 'function' && define.amd) {
    // AMD. Register as an anonymous module.
    define(['ApiClient', 'models/FeeRequest', 'models/UpdatePaymentFundingAccountMinimalRequest'], factory);
  } else if (typeof module === 'object' && module.exports) {
    // CommonJS-like environments that support module.exports, like Node.
    module.exports = factory(require('../ApiClient'), require('./FeeRequest'), require('./UpdatePaymentFundingAccountMinimalRequest'));
  } else {
    // Browser globals (root is window)
    if (!root.OrbipayPaymentsapiClient) {
      root.OrbipayPaymentsapiClient = {};
    }
    root.OrbipayPaymentsapiClient.UpdatePaymentRequest = factory(root.OrbipayPaymentsapiClient.ApiClient, root.OrbipayPaymentsapiClient.FeeRequest, root.OrbipayPaymentsapiClient.UpdatePaymentFundingAccountMinimalRequest);
  }
}(this, function(ApiClient, FeeRequest, UpdatePaymentFundingAccountMinimalRequest) {
  'use strict';




  /**
   * The UpdatePaymentRequest model module.
   * @module models/UpdatePaymentRequest
   */

  /**
   * <h3 style="color:red"> This class subject to change without prior notice, Please dont use this class directly. </h3>

   * Constructs a new <code>UpdatePaymentRequest</code>.
   * @alias module:models/UpdatePaymentRequest
   * @class
   */
  var exports = function() {
    var _this = this;










  };

  /**
   * Constructs a <code>UpdatePaymentRequest</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:models/UpdatePaymentRequest} obj Optional instance to populate.
   * @return {module:models/UpdatePaymentRequest} The populated <code>UpdatePaymentRequest</code> instance.
   */
  exports.constructFromObject = function(data, obj) {
    if (data) {
      obj = obj || new exports();

      if (data.hasOwnProperty('comments')) {
        obj['comments'] = ApiClient.convertToType(data['comments'], 'String');
      }
      if (data.hasOwnProperty('custom_fields')) {
        obj['custom_fields'] = ApiClient.convertToType(data['custom_fields'], {'String': 'String'});
      }
      if (data.hasOwnProperty('fee')) {
        obj['fee'] = FeeRequest.constructFromObject(data['fee']);
      }
      if (data.hasOwnProperty('amount')) {
        obj['amount'] = ApiClient.convertToType(data['amount'], 'String');
      }
      if (data.hasOwnProperty('card_cvv_number')) {
        obj['card_cvv_number'] = ApiClient.convertToType(data['card_cvv_number'], 'String');
      }
      if (data.hasOwnProperty('payment_date')) {
        obj['payment_date'] = ApiClient.convertToType(data['payment_date'], 'String');
      }
      if (data.hasOwnProperty('payment_request_date')) {
        obj['payment_request_date'] = ApiClient.convertToType(data['payment_request_date'], 'String');
      }
      if (data.hasOwnProperty('payment_amount_type')) {
        obj['payment_amount_type'] = ApiClient.convertToType(data['payment_amount_type'], 'String');
      }
      if (data.hasOwnProperty('funding_account')) {
        obj['funding_account'] = UpdatePaymentFundingAccountMinimalRequest.constructFromObject(data['funding_account']);
      }
    }
    return obj;
  };

  /**
   * Comments that can be used to recollect the operation performed on the resource object. API clients need to ensure that no sensitive information is passed in the memo. Alacriti (EBPP) is not responsible for the security of any sensitive information that may be passed as part of the memo.
   * @member {String} comments
   */
  exports.prototype['comments'] = undefined;
  /**
   * The additional information or meta-information that EBPP can accept, maintain and transmit back to the client. The custom fields need to be configured with EBPP before they can be accepted. EBPP would reject custom fields that are not pre-configured. Please contact <a href = \"mailto: support@billerpayments.com\">support@billerpayments.com</a> for more information on configuring and using custom fields. Only the custom fields enabled for the client, in EBPP, would be accepted in the requests.
   * @member {Object.<String, String>} custom_fields
   */
  exports.prototype['custom_fields'] = undefined;
  /**
   * @member {module:models/FeeRequest} fee
   */
  exports.prototype['fee'] = undefined;
  /**
   * The amount being paid. In case the payment_amount_type is 'discounted_amount', 'penalty_amount' or 'other', the amount needs to be specified. In other cases, this is derived from the payment_amount_type.
   * @member {String} amount
   */
  exports.prototype['amount'] = undefined;
  /**
   * This is never returned by EBPP. This needs to be passed to EBPP when making or editing a payment with a card funding account.
   * @member {String} card_cvv_number
   */
  exports.prototype['card_cvv_number'] = undefined;
  /**
   * The date on which the payment is scheduled to be made. It must be in ISO8601 full-date format, namely, YYYY-MM-DD.
   * @member {String} payment_date
   */
  exports.prototype['payment_date'] = undefined;
  /**
   * The date on which the biller wants the payment to be settled. It must be in ISO8601 full-date format, namely, YYYY-MM-DD.  This is applicable only if the client has opted for it.
   * @member {String} payment_request_date
   */
  exports.prototype['payment_request_date'] = undefined;
  /**
   * The type of amount, as per the bill/statement, that is being paid. The payment amount is derived from the amount type selected for the payment. This defaults to other.
   * @member {module:models/UpdatePaymentRequest.PaymentAmountTypeEnum} payment_amount_type
   */
  exports.prototype['payment_amount_type'] = undefined;
  /**
   * @member {module:models/UpdatePaymentFundingAccountMinimalRequest} funding_account
   */
  exports.prototype['funding_account'] = undefined;


  /**
   * Allowed values for the <code>payment_amount_type</code> property.
   * @enum {String}
   * @readonly
   */
  exports.PaymentAmountTypeEnum = {
    /**
     * value: "current_balance"
     * @const
     */
    "current_balance": "current_balance",
    /**
     * value: "minimum_payment_due"
     * @const
     */
    "minimum_payment_due": "minimum_payment_due",
    /**
     * value: "past_payment_due"
     * @const
     */
    "past_payment_due": "past_payment_due",
    /**
     * value: "statement_balance"
     * @const
     */
    "statement_balance": "statement_balance",
    /**
     * value: "discounted_amount"
     * @const
     */
    "discounted_amount": "discounted_amount",
    /**
     * value: "penalty_amount"
     * @const
     */
    "penalty_amount": "penalty_amount",
    /**
     * value: "other"
     * @const
     */
    "other": "other"  };


  return exports;
}));