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




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

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

   * Constructs a new <code>SimplePaymentRequest</code>.
   * @alias module:models/SimplePaymentRequest
   * @class
   * @param payment_amount_type {module:models/SimplePaymentRequest.PaymentAmountTypeEnum} 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.
   * @param customer {module:models/SimplePaymentCustomerRequest} 
   * @param funding_account {module:models/SimplePaymentFundingAccountRequest} 
   * @param customer_account {module:models/CreateCustomerAccountRequest} 
   */
  var exports = function(payment_amount_type, customer, funding_account, customer_account) {
    var _this = this;





    _this['payment_amount_type'] = payment_amount_type;

    _this['customer'] = customer;
    _this['funding_account'] = funding_account;
    _this['customer_account'] = customer_account;




  };

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

      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('fee')) {
        obj['fee'] = FeeRequest.constructFromObject(data['fee']);
      }
      if (data.hasOwnProperty('customer')) {
        obj['customer'] = SimplePaymentCustomerRequest.constructFromObject(data['customer']);
      }
      if (data.hasOwnProperty('funding_account')) {
        obj['funding_account'] = SimplePaymentFundingAccountRequest.constructFromObject(data['funding_account']);
      }
      if (data.hasOwnProperty('customer_account')) {
        obj['customer_account'] = CreateCustomerAccountRequest.constructFromObject(data['customer_account']);
      }
      if (data.hasOwnProperty('payment_reference')) {
        obj['payment_reference'] = ApiClient.convertToType(data['payment_reference'], 'String');
      }
      if (data.hasOwnProperty('payment_notification_email')) {
        obj['payment_notification_email'] = ApiClient.convertToType(data['payment_notification_email'], 'String');
      }
      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'});
      }
    }
    return obj;
  };

  /**
   * 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.
   * @member {module:models/SimplePaymentRequest.PaymentAmountTypeEnum} payment_amount_type
   */
  exports.prototype['payment_amount_type'] = undefined;
  /**
   * @member {module:models/FeeRequest} fee
   */
  exports.prototype['fee'] = undefined;
  /**
   * @member {module:models/SimplePaymentCustomerRequest} customer
   */
  exports.prototype['customer'] = undefined;
  /**
   * @member {module:models/SimplePaymentFundingAccountRequest} funding_account
   */
  exports.prototype['funding_account'] = undefined;
  /**
   * @member {module:models/CreateCustomerAccountRequest} customer_account
   */
  exports.prototype['customer_account'] = undefined;
  /**
   * The unique identifier in the client system for the payment.
   * @member {String} payment_reference
   */
  exports.prototype['payment_reference'] = undefined;
  /**
   * The email address of the customer to which payment notifications from EBPP will be sent. The notifications will be sent to customer email in case if this field is not present.
   * @member {String} payment_notification_email
   */
  exports.prototype['payment_notification_email'] = undefined;
  /**
   * 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.
   * @member {Object.<String, String>} custom_fields
   */
  exports.prototype['custom_fields'] = 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;
}));