(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.
   * @member {String} comments
   */
  exports.prototype['comments'] = undefined;
  /**
   * The additional information or meta-information that EBPP can accept, maintain and transmit back to the client. 
   * @member {Object.<String, String>} custom_fields
   */
  exports.prototype['custom_fields'] = undefined;
  /**
   * @member {module:models/FeeRequest} fee
   */
  exports.prototype['fee'] = undefined;
  /**
   * The amount being paid. 
   * @member {String} amount
   */
  exports.prototype['amount'] = undefined;
  /**
   * @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.
   * @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",
    /**
     * value: "payoff_amount"
     * @const
     */
    "payoff_amount": "payoff_amount",
    /**
     * value: "paydown_amount"
     * @const
     */
    "paydown_amount": "paydown_amount"  };


  return exports;
}));