(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 Fee wrapper module.
    * @module wrappers/Fee
    */
  var exports = function(fee_amount) {
  	var _this = this;
        Base.call(_this);
  		_this['fee_amount'] = fee_amount;
  };

      /**
      * Constructs a <code>Fee</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:wrappers/Fee} obj Optional instance to populate.
      * @return {module:wrappers/Fee} The populated <code>Fee</code> instance.
      */
  exports.constructFromObject = function (data, obj) {
        if (data) {
            obj = obj || new exports();
            if (data.hasOwnProperty('fee_type')) {
                obj['fee_type'] = data['fee_type'];
            }
            if (data.hasOwnProperty('fee_amount')) {
                obj['fee_amount'] = data['fee_amount'];
            }
            if (data.hasOwnProperty('id')) {
                obj['id'] = data['id'];
            }
            if (data.hasOwnProperty('url')) {
                obj['url'] = data['url'];
            }
        }
        return obj;
  };


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

    /**
    * The way the fee is being charged to the customer. Fee could be added to the amount being paid, or, it could be charged separately by the biller. The fee_type would default to add_to_principal if the fee is not configured for the client in EBPP.
    * @member {String} fee_type
    */
  exports.prototype['fee_type'] = undefined;
    /**
    * The fee amount upto 2 decimal places.
    * @member {String} fee_amount
    */
  exports.prototype['fee_amount'] = undefined;
    /**
    * The unique identifier assigned by EBPP to the fee. In case of split fee.
    * @member {String} id
    */
  exports.prototype['id'] = undefined;
    /**
    * This URL fetches the details of fee as a payment resource. In case of split fee.
    * @member {String} url
    */
  exports.prototype['url'] = undefined;




  return exports;

}));