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