(function(root, factory) {

if (typeof module === 'object' && module.exports) {
    // CommonJS-like environments that support module.exports, like Node.
    module.exports = factory(require('../ApiClient'), require('./InvocationContext'), require('../CommonUtil'), require('../ResponseWrapper'), require('./Base'), require('../OrbipayApiError'));
  }
}(this, function(ApiClient, InvocationContext, CommonUtil, ResponseWrapper, Base, OrbipayApiError) {
  'use strict';

    /**
    * The RecordedPayments wrapper module.
    * @module wrappers/RecordedPayments
    */
  var exports = function() {

  };
  exports.constructFromObject = function (data, obj) {
        if (data) {
            obj = obj || new exports();
            if (data.hasOwnProperty('list')) {
		var RecordedPayment = require('./RecordedPayment');
                obj['list'] = ApiClient.convertToType(data['list'], [RecordedPayment]);
            }
            if (data.hasOwnProperty('total_results_count')) {
                obj['total_results_count'] = data['total_results_count'];
            }
            if (data.hasOwnProperty('has_more_results')) {
                obj['has_more_results'] = data['has_more_results'];
            }
            if (data.hasOwnProperty('url')) {
                obj['url'] = data['url'];
            }
            if (data.hasOwnProperty('from_index')) {
                obj['from_index'] = data['from_index'];
            }
            if (data.hasOwnProperty('to_index')) {
                obj['to_index'] = data['to_index'];
            }
            if (data.hasOwnProperty('query_id')) {
                obj['query_id'] = data['query_id'];
            }
        }
        return obj;
  };


  exports.prototype = Object.create(Base.prototype);
  exports.prototype.constructor = exports;

    /**
    * @member [RecordedPayment] list
    */
  exports.prototype['list'] = undefined;
    /**
    * total number of payments available with matching criteria
    * @member {String} total_results_count
    */
  exports.prototype['total_results_count'] = undefined;
    /**
    * true if there are more results or pages
    * @member {String} has_more_results
    */
  exports.prototype['has_more_results'] = undefined;
    /**
    * This URL fetches the next or previous set of payments, based on the presence of after_object or before_object parameter.
    * @member {String} url
    */
  exports.prototype['url'] = undefined;
    /**
    * The id of the object before which the previous set of objects are to be retrieved.
    * @member {String} from_index
    */
  exports.prototype['from_index'] = undefined;
    /**
    * The id of the object after which the next set of objects are to be retrieved.
    * @member {String} to_index
    */
  exports.prototype['to_index'] = undefined;
    /**
    * The query id of the object.
    * @member {String} query_id
    */
  exports.prototype['query_id'] = undefined;

  /**
  * @param  {String} client_key - The client_key of RecordedPayments. 
  * @return {module:wrappers/RecordedPayments} The instance of <code>RecordedPayments</code>.
  */
  exports.prototype.forClient = function (client_key) {
        var _this = this;
	    Base.prototype.forClient.call(_this,client_key);
        return _this;
  };
  /**
  * @param  {String} channel - The channel of RecordedPayments. 
  * @return {module:wrappers/RecordedPayments} The instance of <code>RecordedPayments</code>.
  */
  exports.prototype.videChannel = function (channel) {
        var _this = this;
	    Base.prototype.videChannel.call(_this,channel);
        return _this;
  };
  /**
  * @param  {String} from_index - The from_index of RecordedPayments. 
  * @param  {String} to_index - The to_index of RecordedPayments. 
  * @param  {String} query_id - The query_id of RecordedPayments. 
  * @return {module:wrappers/RecordedPayments} The instance of <code>RecordedPayments</code>.
  */
  exports.prototype.findBy = function (filterParameters) {
        var _this = this;
        if(filterParameters){
        
        _this['from_index'] = CommonUtil.getValuesFromMultiMap(filterParameters, 'from_index', false);
        
        _this['to_index'] = CommonUtil.getValuesFromMultiMap(filterParameters, 'to_index', false);
        
        _this['query_id'] = CommonUtil.getValuesFromMultiMap(filterParameters, 'query_id', false);
        }
        return _this;
  };
  /**
  * @return {module:wrappers/RecordedPayments} The instance of <code>RecordedPayments</code>.
  */
  exports.prototype.forCustomer = function () {
        var _this = this;


        return _this;
  };



  return exports;

}));