(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 FeeRefund wrapper module.
* @module wrappers/FeeRefund
*/
var exports = function(fee_refund_amount) {
var _this = this;
Base.call(_this);
_this['fee_refund_amount'] = fee_refund_amount;
};
/**
* Constructs a <code>FeeRefund</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/FeeRefund} obj Optional instance to populate.
* @return {module:wrappers/FeeRefund} The populated <code>FeeRefund</code> instance.
*/
exports.constructFromObject = function (data, obj) {
if (data) {
obj = obj || new exports();
if (data.hasOwnProperty('fee_refund_amount')) {
obj['fee_refund_amount'] = data['fee_refund_amount'];
}
if (data.hasOwnProperty('fee_type')) {
obj['fee_type'] = data['fee_type'];
}
}
return obj;
};
exports.prototype = Object.create(Base.prototype);
exports.prototype.constructor = exports;
/**
* The refunded fee amount upto 2 decimal places.
* @member {String} fee_refund_amount
*/
exports.prototype['fee_refund_amount'] = undefined;
/**
* 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;
return exports;
}));