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 SourcePayment wrapper module.
  14. 14 : * @module wrappers/SourcePayment
  15. 15 : */
  16. 16 : var exports = function() {
  17. 17 :
  18. 18 : };
  19. 19 : exports.constructFromObject = function (data, obj) {
  20. 20 : if (data) {
  21. 21 : obj = obj || new exports();
  22. 22 : if (data.hasOwnProperty('id')) {
  23. 23 : obj['id'] = data['id'];
  24. 24 : }
  25. 25 : if (data.hasOwnProperty('url')) {
  26. 26 : obj['url'] = data['url'];
  27. 27 : }
  28. 28 : if (data.hasOwnProperty('customer')) {
  29. 29 : var Customer = require('./Customer');
  30. 30 : obj['customer'] = Customer.constructFromObject(data['customer']);
  31. 31 : }
  32. 32 : if (data.hasOwnProperty('customer_account')) {
  33. 33 : var CustomerAccount = require('./CustomerAccount');
  34. 34 : obj['customer_account'] = CustomerAccount.constructFromObject(data['customer_account']);
  35. 35 : }
  36. 36 : if (data.hasOwnProperty('funding_account')) {
  37. 37 : var FundingAccount = require('./FundingAccount');
  38. 38 : obj['funding_account'] = FundingAccount.constructFromObject(data['funding_account']);
  39. 39 : }
  40. 40 : }
  41. 41 : return obj;
  42. 42 : };
  43. 43 :
  44. 44 :
  45. 45 : exports.prototype = Object.create(Base.prototype);
  46. 46 : exports.prototype.constructor = exports;
  47. 47 :
  48. 48 : /**
  49. 49 : * @member {String} id
  50. 50 : */
  51. 51 : exports.prototype['id'] = undefined;
  52. 52 : /**
  53. 53 : * This URL fetches the details of source payment.
  54. 54 : * @member {String} url
  55. 55 : */
  56. 56 : exports.prototype['url'] = undefined;
  57. 57 : /**
  58. 58 : * @member {Customer} customer
  59. 59 : */
  60. 60 : exports.prototype['customer'] = undefined;
  61. 61 : /**
  62. 62 : * @member {CustomerAccount} customer_account
  63. 63 : */
  64. 64 : exports.prototype['customer_account'] = undefined;
  65. 65 : /**
  66. 66 : * @member {FundingAccount} funding_account
  67. 67 : */
  68. 68 : exports.prototype['funding_account'] = undefined;
  69. 69 :
  70. 70 :
  71. 71 :
  72. 72 :
  73. 73 : return exports;
  74. 74 :
  75. 75 : }));