(function(root, factory) {
  if (typeof define === 'function' && define.amd) {
    // AMD. Register as an anonymous module.
    define(['ApiClient', 'models/FeeRequest', 'models/SimplePaymentCustomerAccountRequest', '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('./FeeRequest'), require('./SimplePaymentCustomerAccountRequest'), require('./SimplePaymentCustomerRequest'), require('./SimplePaymentFundingAccountRequest'));
  } else {
    // Browser globals (root is window)
    if (!root.OrbipayPaymentsapiClient) {
      root.OrbipayPaymentsapiClient = {};
    }
    root.OrbipayPaymentsapiClient.SimplePaymentRequest = factory(root.OrbipayPaymentsapiClient.ApiClient, root.OrbipayPaymentsapiClient.FeeRequest, root.OrbipayPaymentsapiClient.SimplePaymentCustomerAccountRequest, root.OrbipayPaymentsapiClient.SimplePaymentCustomerRequest, root.OrbipayPaymentsapiClient.SimplePaymentFundingAccountRequest);
  }
}(this, function(ApiClient, FeeRequest, SimplePaymentCustomerAccountRequest, 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/SimplePaymentCustomerAccountRequest} 
   */
  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'] = SimplePaymentCustomerAccountRequest.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('cryptogram')) {
        obj['cryptogram'] = ApiClient.convertToType(data['cryptogram'], 'String');
      }
      if (data.hasOwnProperty('eci')) {
        obj['eci'] = ApiClient.convertToType(data['eci'], '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. 
   * @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.
   * @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/SimplePaymentCustomerAccountRequest} 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 to which notifications for the payment will be sent.
   * @member {String} payment_notification_email
   */
  exports.prototype['payment_notification_email'] = undefined;
  /**
   * Online Payment Cryptogram, as defined by 3-D secure.
   * @member {String} cryptogram
   */
  exports.prototype['cryptogram'] = undefined;
  /**
   * ECI Indicator, as defined by 3-D secure. The card network may add an ECI indicator to the card data.
   * @member {String} eci
   */
  exports.prototype['eci'] = undefined;
  /**
   * 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;


  /**
   * 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;
}));