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




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

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

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























  };

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

      if (data.hasOwnProperty('id')) {
        obj['id'] = ApiClient.convertToType(data['id'], 'String');
      }
      if (data.hasOwnProperty('url')) {
        obj['url'] = ApiClient.convertToType(data['url'], 'String');
      }
      if (data.hasOwnProperty('fee')) {
        obj['fee'] = FeeResponse.constructFromObject(data['fee']);
      }
      if (data.hasOwnProperty('status')) {
        obj['status'] = ApiClient.convertToType(data['status'], 'String');
      }
      if (data.hasOwnProperty('payment_method')) {
        obj['payment_method'] = ApiClient.convertToType(data['payment_method'], 'String');
      }
      if (data.hasOwnProperty('token')) {
        obj['token'] = ApiClient.convertToType(data['token'], 'String');
      }
      if (data.hasOwnProperty('confirmation_number')) {
        obj['confirmation_number'] = ApiClient.convertToType(data['confirmation_number'], 'String');
      }
      if (data.hasOwnProperty('custom_fields')) {
        obj['custom_fields'] = ApiClient.convertToType(data['custom_fields'], {'String': 'String'});
      }
      if (data.hasOwnProperty('currency_code3d')) {
        obj['currency_code3d'] = ApiClient.convertToType(data['currency_code3d'], 'String');
      }
      if (data.hasOwnProperty('amount')) {
        obj['amount'] = ApiClient.convertToType(data['amount'], 'String');
      }
      if (data.hasOwnProperty('payment_date')) {
        obj['payment_date'] = ApiClient.convertToType(data['payment_date'], 'String');
      }
      if (data.hasOwnProperty('payment_schedule_type')) {
        obj['payment_schedule_type'] = ApiClient.convertToType(data['payment_schedule_type'], 'String');
      }
      if (data.hasOwnProperty('payment_amount_type')) {
        obj['payment_amount_type'] = ApiClient.convertToType(data['payment_amount_type'], 'String');
      }
      if (data.hasOwnProperty('payment_reference')) {
        obj['payment_reference'] = ApiClient.convertToType(data['payment_reference'], 'String');
      }
      if (data.hasOwnProperty('payment_entry_date')) {
        obj['payment_entry_date'] = ApiClient.convertToType(data['payment_entry_date'], 'String');
      }
      if (data.hasOwnProperty('payment_return_date')) {
        obj['payment_return_date'] = ApiClient.convertToType(data['payment_return_date'], 'String');
      }
      if (data.hasOwnProperty('comments')) {
        obj['comments'] = ApiClient.convertToType(data['comments'], 'String');
      }
      if (data.hasOwnProperty('return_code')) {
        obj['return_code'] = ApiClient.convertToType(data['return_code'], 'String');
      }
      if (data.hasOwnProperty('customer')) {
        obj['customer'] = SimplePaymentCustomerResponse.constructFromObject(data['customer']);
      }
      if (data.hasOwnProperty('funding_account')) {
        obj['funding_account'] = RecordedPaymentFundingAccount.constructFromObject(data['funding_account']);
      }
      if (data.hasOwnProperty('customer_account')) {
        obj['customer_account'] = CustomerAccountResponse.constructFromObject(data['customer_account']);
      }
      if (data.hasOwnProperty('audit_info')) {
        obj['audit_info'] = AuditInfoVo.constructFromObject(data['audit_info']);
      }
    }
    return obj;
  };

  /**
   * The unique identifier assigned by EBPP to the payment.
   * @member {String} id
   */
  exports.prototype['id'] = undefined;
  /**
   * This URL fetches the details of payment.
   * @member {String} url
   */
  exports.prototype['url'] = undefined;
  /**
   * @member {module:models/FeeResponse} fee
   */
  exports.prototype['fee'] = undefined;
  /**
   * The status of the payment.
   * @member {module:models/RecordedPaymentResponse.StatusEnum} status
   */
  exports.prototype['status'] = undefined;
  /**
   * The non fulfillment method for the payment.
   * @member {module:models/RecordedPaymentResponse.PaymentMethodEnum} payment_method
   */
  exports.prototype['payment_method'] = undefined;
  /**
   * The token is used to uniquely identify the payment, such as the POS token.
   * @member {String} token
   */
  exports.prototype['token'] = undefined;
  /**
   * The confirmation number or reference provided to the customer for the payment.
   * @member {String} confirmation_number
   */
  exports.prototype['confirmation_number'] = 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;
  /**
   * The three-letter currency code in the ISO4217 format, in uppercase, for the card account. It must be a currency supported by EBPP. This defaults to USD.
   * @member {String} currency_code3d
   */
  exports.prototype['currency_code3d'] = undefined;
  /**
   * The amount being paid. In case the payment_amount_type is '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;
  /**
   * 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 schedule type for the payment. This defaults to one_time_payment.
   * @member {module:models/RecordedPaymentResponse.PaymentScheduleTypeEnum} payment_schedule_type
   */
  exports.prototype['payment_schedule_type'] = 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/RecordedPaymentResponse.PaymentAmountTypeEnum} payment_amount_type
   */
  exports.prototype['payment_amount_type'] = undefined;
  /**
   * The unique identifier in the client system for the payment.
   * @member {String} payment_reference
   */
  exports.prototype['payment_reference'] = undefined;
  /**
   * The date on which the payment is captured in EBPP. It must be in ISO8601 full-date format, namely, YYYY-MM-DD.
   * @member {String} payment_entry_date
   */
  exports.prototype['payment_entry_date'] = undefined;
  /**
   * The date on which the ACH returns is received by EBPP.
   * @member {String} payment_return_date
   */
  exports.prototype['payment_return_date'] = 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 ACH return code or the chargeback code received from Visa/Mastercard, in the event of returned payments.
   * @member {String} return_code
   */
  exports.prototype['return_code'] = undefined;
  /**
   * @member {module:models/SimplePaymentCustomerResponse} customer
   */
  exports.prototype['customer'] = undefined;
  /**
   * @member {module:models/RecordedPaymentFundingAccount} funding_account
   */
  exports.prototype['funding_account'] = undefined;
  /**
   * @member {module:models/CustomerAccountResponse} customer_account
   */
  exports.prototype['customer_account'] = undefined;
  /**
   * @member {module:models/AuditInfoVo} audit_info
   */
  exports.prototype['audit_info'] = undefined;


  /**
   * Allowed values for the <code>status</code> property.
   * @enum {String}
   * @readonly
   */
  exports.StatusEnum = {
    /**
     * value: "processed"
     * @const
     */
    "processed": "processed",
    /**
     * value: "cancelled"
     * @const
     */
    "cancelled": "cancelled"  };

  /**
   * Allowed values for the <code>payment_method</code> property.
   * @enum {String}
   * @readonly
   */
  exports.PaymentMethodEnum = {
    /**
     * value: "cash"
     * @const
     */
    "cash": "cash",
    /**
     * value: "swiped_card"
     * @const
     */
    "swiped_card": "swiped_card",
    /**
     * value: "scanned_check"
     * @const
     */
    "scanned_check": "scanned_check"  };

  /**
   * Allowed values for the <code>payment_schedule_type</code> property.
   * @enum {String}
   * @readonly
   */
  exports.PaymentScheduleTypeEnum = {
    /**
     * value: "one_time_payment"
     * @const
     */
    "one_time_payment": "one_time_payment"  };

  /**
   * 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: "other"
     * @const
     */
    "other": "other"  };


  return exports;
}));