- 1 :
- 2 :
- 3 :
(function(root, factory) {
- 4 :
- 5 :
if (typeof module === 'object' && module.exports) {
- 6 :
// CommonJS-like environments that support module.exports, like Node.
- 7 :
module.exports = factory(require('../ApiClient'), require('./InvocationContext'), require('../CommonUtil'), require('../ResponseWrapper'), require('./Base'), require('../OrbipayApiError'));
- 8 :
}
- 9 :
}(this, function(ApiClient, InvocationContext, CommonUtil, ResponseWrapper, Base, OrbipayApiError) {
- 10 :
'use strict';
- 11 :
- 12 :
/**
- 13 :
* The FeeRefund wrapper module.
- 14 :
* @module wrappers/FeeRefund
- 15 :
*/
- 16 :
var exports = function(fee_refund_amount) {
- 17 :
var _this = this;
- 18 :
Base.call(_this);
- 19 :
_this['fee_refund_amount'] = fee_refund_amount;
- 20 :
};
- 21 :
- 22 :
/**
- 23 :
* Constructs a <code>FeeRefund</code> from a plain JavaScript object, optionally creating a new instance.
- 24 :
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
- 25 :
* @param {Object} data The plain JavaScript object bearing properties of interest.
- 26 :
* @param {module:wrappers/FeeRefund} obj Optional instance to populate.
- 27 :
* @return {module:wrappers/FeeRefund} The populated <code>FeeRefund</code> instance.
- 28 :
*/
- 29 :
exports.constructFromObject = function (data, obj) {
- 30 :
if (data) {
- 31 :
obj = obj || new exports();
- 32 :
if (data.hasOwnProperty('fee_refund_amount')) {
- 33 :
obj['fee_refund_amount'] = data['fee_refund_amount'];
- 34 :
}
- 35 :
if (data.hasOwnProperty('fee_type')) {
- 36 :
obj['fee_type'] = data['fee_type'];
- 37 :
}
- 38 :
}
- 39 :
return obj;
- 40 :
};
- 41 :
- 42 :
- 43 :
exports.prototype = Object.create(Base.prototype);
- 44 :
exports.prototype.constructor = exports;
- 45 :
- 46 :
/**
- 47 :
* The refunded fee amount upto 2 decimal places.
- 48 :
* @member {String} fee_refund_amount
- 49 :
*/
- 50 :
exports.prototype['fee_refund_amount'] = undefined;
- 51 :
/**
- 52 :
* 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.
- 53 :
* @member {String} fee_type
- 54 :
*/
- 55 :
exports.prototype['fee_type'] = undefined;
- 56 :
- 57 :
- 58 :
- 59 :
- 60 :
return exports;
- 61 :
- 62 :
}));