1. 1 : (function(root, factory) {
  2. 2 : if (typeof define === 'function' && define.amd) {
  3. 3 : // AMD. Register as an anonymous module.
  4. 4 : define(['ApiClient', 'models/PaymentAuthCustomerAccountRequest', 'models/PaymentAuthCustomerRequest', 'models/PaymentAuthFundingAccountRequest'], factory);
  5. 5 : } else 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('./PaymentAuthCustomerAccountRequest'), require('./PaymentAuthCustomerRequest'), require('./PaymentAuthFundingAccountRequest'));
  8. 8 : } else {
  9. 9 : // Browser globals (root is window)
  10. 10 : if (!root.OrbipayPaymentsapiClient) {
  11. 11 : root.OrbipayPaymentsapiClient = {};
  12. 12 : }
  13. 13 : root.OrbipayPaymentsapiClient.CreatePaymentAuthorizationRequest = factory(root.OrbipayPaymentsapiClient.ApiClient, root.OrbipayPaymentsapiClient.PaymentAuthCustomerAccountRequest, root.OrbipayPaymentsapiClient.PaymentAuthCustomerRequest, root.OrbipayPaymentsapiClient.PaymentAuthFundingAccountRequest);
  14. 14 : }
  15. 15 : }(this, function(ApiClient, PaymentAuthCustomerAccountRequest, PaymentAuthCustomerRequest, PaymentAuthFundingAccountRequest) {
  16. 16 : 'use strict';
  17. 17 :
  18. 18 :
  19. 19 :
  20. 20 :
  21. 21 : /**
  22. 22 : * The CreatePaymentAuthorizationRequest model module.
  23. 23 : * @module models/CreatePaymentAuthorizationRequest
  24. 24 : */
  25. 25 :
  26. 26 : /**
  27. 27 : * <h3 style="color:red"> This class subject to change without prior notice, Please dont use this class directly. </h3>
  28. 28 :
  29. 29 : * Constructs a new <code>CreatePaymentAuthorizationRequest</code>.
  30. 30 : * @alias module:models/CreatePaymentAuthorizationRequest
  31. 31 : * @class
  32. 32 : * @param auth_amount {String} The amount being authorized.
  33. 33 : * @param customer {module:models/PaymentAuthCustomerRequest}
  34. 34 : * @param funding_account {module:models/PaymentAuthFundingAccountRequest}
  35. 35 : * @param customer_account {module:models/PaymentAuthCustomerAccountRequest}
  36. 36 : */
  37. 37 : var exports = function(auth_amount, customer, funding_account, customer_account) {
  38. 38 : var _this = this;
  39. 39 :
  40. 40 :
  41. 41 : _this['auth_amount'] = auth_amount;
  42. 42 :
  43. 43 : _this['customer'] = customer;
  44. 44 : _this['funding_account'] = funding_account;
  45. 45 : _this['customer_account'] = customer_account;
  46. 46 :
  47. 47 :
  48. 48 : };
  49. 49 :
  50. 50 : /**
  51. 51 : * Constructs a <code>CreatePaymentAuthorizationRequest</code> from a plain JavaScript object, optionally creating a new instance.
  52. 52 : * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
  53. 53 : * @param {Object} data The plain JavaScript object bearing properties of interest.
  54. 54 : * @param {module:models/CreatePaymentAuthorizationRequest} obj Optional instance to populate.
  55. 55 : * @return {module:models/CreatePaymentAuthorizationRequest} The populated <code>CreatePaymentAuthorizationRequest</code> instance.
  56. 56 : */
  57. 57 : exports.constructFromObject = function(data, obj) {
  58. 58 : if (data) {
  59. 59 : obj = obj || new exports();
  60. 60 :
  61. 61 : if (data.hasOwnProperty('payment_auth_reference')) {
  62. 62 : obj['payment_auth_reference'] = ApiClient.convertToType(data['payment_auth_reference'], 'String');
  63. 63 : }
  64. 64 : if (data.hasOwnProperty('auth_amount')) {
  65. 65 : obj['auth_amount'] = ApiClient.convertToType(data['auth_amount'], 'String');
  66. 66 : }
  67. 67 : if (data.hasOwnProperty('card_cvv_number')) {
  68. 68 : obj['card_cvv_number'] = ApiClient.convertToType(data['card_cvv_number'], 'String');
  69. 69 : }
  70. 70 : if (data.hasOwnProperty('customer')) {
  71. 71 : obj['customer'] = PaymentAuthCustomerRequest.constructFromObject(data['customer']);
  72. 72 : }
  73. 73 : if (data.hasOwnProperty('funding_account')) {
  74. 74 : obj['funding_account'] = PaymentAuthFundingAccountRequest.constructFromObject(data['funding_account']);
  75. 75 : }
  76. 76 : if (data.hasOwnProperty('customer_account')) {
  77. 77 : obj['customer_account'] = PaymentAuthCustomerAccountRequest.constructFromObject(data['customer_account']);
  78. 78 : }
  79. 79 : if (data.hasOwnProperty('comments')) {
  80. 80 : obj['comments'] = ApiClient.convertToType(data['comments'], 'String');
  81. 81 : }
  82. 82 : if (data.hasOwnProperty('custom_fields')) {
  83. 83 : obj['custom_fields'] = ApiClient.convertToType(data['custom_fields'], {'String': 'String'});
  84. 84 : }
  85. 85 : }
  86. 86 : return obj;
  87. 87 : };
  88. 88 :
  89. 89 : /**
  90. 90 : * The unique identifier in the client system for the payment authorization. This is mandatory in case of voyager fleet card payment.
  91. 91 : * @member {String} payment_auth_reference
  92. 92 : */
  93. 93 : exports.prototype['payment_auth_reference'] = undefined;
  94. 94 : /**
  95. 95 : * The amount being authorized.
  96. 96 : * @member {String} auth_amount
  97. 97 : */
  98. 98 : exports.prototype['auth_amount'] = undefined;
  99. 99 : /**
  100. 100 : * @member {String} card_cvv_number
  101. 101 : */
  102. 102 : exports.prototype['card_cvv_number'] = undefined;
  103. 103 : /**
  104. 104 : * @member {module:models/PaymentAuthCustomerRequest} customer
  105. 105 : */
  106. 106 : exports.prototype['customer'] = undefined;
  107. 107 : /**
  108. 108 : * @member {module:models/PaymentAuthFundingAccountRequest} funding_account
  109. 109 : */
  110. 110 : exports.prototype['funding_account'] = undefined;
  111. 111 : /**
  112. 112 : * @member {module:models/PaymentAuthCustomerAccountRequest} customer_account
  113. 113 : */
  114. 114 : exports.prototype['customer_account'] = undefined;
  115. 115 : /**
  116. 116 : * Comments that can be used to recollect the operation performed on the resource object.
  117. 117 : * @member {String} comments
  118. 118 : */
  119. 119 : exports.prototype['comments'] = undefined;
  120. 120 : /**
  121. 121 : * The additional information or meta-information that EBPP can accept, maintain and transmit back to the client.
  122. 122 : * @member {Object.<String, String>} custom_fields
  123. 123 : */
  124. 124 : exports.prototype['custom_fields'] = undefined;
  125. 125 :
  126. 126 :
  127. 127 :
  128. 128 : return exports;
  129. 129 : }));
  130. 130 :
  131. 131 :