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/FeeRequest', 'models/UpdatePaymentFundingAccountMinimalRequest'], 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('./FeeRequest'), require('./UpdatePaymentFundingAccountMinimalRequest'));
  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.UpdatePaymentRequest = factory(root.OrbipayPaymentsapiClient.ApiClient, root.OrbipayPaymentsapiClient.FeeRequest, root.OrbipayPaymentsapiClient.UpdatePaymentFundingAccountMinimalRequest);
  14. 14 : }
  15. 15 : }(this, function(ApiClient, FeeRequest, UpdatePaymentFundingAccountMinimalRequest) {
  16. 16 : 'use strict';
  17. 17 :
  18. 18 :
  19. 19 :
  20. 20 :
  21. 21 : /**
  22. 22 : * The UpdatePaymentRequest model module.
  23. 23 : * @module models/UpdatePaymentRequest
  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>UpdatePaymentRequest</code>.
  30. 30 : * @alias module:models/UpdatePaymentRequest
  31. 31 : * @class
  32. 32 : */
  33. 33 : var exports = function() {
  34. 34 : var _this = this;
  35. 35 :
  36. 36 :
  37. 37 :
  38. 38 :
  39. 39 :
  40. 40 :
  41. 41 :
  42. 42 :
  43. 43 :
  44. 44 :
  45. 45 : };
  46. 46 :
  47. 47 : /**
  48. 48 : * Constructs a <code>UpdatePaymentRequest</code> from a plain JavaScript object, optionally creating a new instance.
  49. 49 : * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
  50. 50 : * @param {Object} data The plain JavaScript object bearing properties of interest.
  51. 51 : * @param {module:models/UpdatePaymentRequest} obj Optional instance to populate.
  52. 52 : * @return {module:models/UpdatePaymentRequest} The populated <code>UpdatePaymentRequest</code> instance.
  53. 53 : */
  54. 54 : exports.constructFromObject = function(data, obj) {
  55. 55 : if (data) {
  56. 56 : obj = obj || new exports();
  57. 57 :
  58. 58 : if (data.hasOwnProperty('comments')) {
  59. 59 : obj['comments'] = ApiClient.convertToType(data['comments'], 'String');
  60. 60 : }
  61. 61 : if (data.hasOwnProperty('custom_fields')) {
  62. 62 : obj['custom_fields'] = ApiClient.convertToType(data['custom_fields'], {'String': 'String'});
  63. 63 : }
  64. 64 : if (data.hasOwnProperty('fee')) {
  65. 65 : obj['fee'] = FeeRequest.constructFromObject(data['fee']);
  66. 66 : }
  67. 67 : if (data.hasOwnProperty('amount')) {
  68. 68 : obj['amount'] = ApiClient.convertToType(data['amount'], 'String');
  69. 69 : }
  70. 70 : if (data.hasOwnProperty('card_cvv_number')) {
  71. 71 : obj['card_cvv_number'] = ApiClient.convertToType(data['card_cvv_number'], 'String');
  72. 72 : }
  73. 73 : if (data.hasOwnProperty('payment_date')) {
  74. 74 : obj['payment_date'] = ApiClient.convertToType(data['payment_date'], 'String');
  75. 75 : }
  76. 76 : if (data.hasOwnProperty('payment_request_date')) {
  77. 77 : obj['payment_request_date'] = ApiClient.convertToType(data['payment_request_date'], 'String');
  78. 78 : }
  79. 79 : if (data.hasOwnProperty('payment_amount_type')) {
  80. 80 : obj['payment_amount_type'] = ApiClient.convertToType(data['payment_amount_type'], 'String');
  81. 81 : }
  82. 82 : if (data.hasOwnProperty('funding_account')) {
  83. 83 : obj['funding_account'] = UpdatePaymentFundingAccountMinimalRequest.constructFromObject(data['funding_account']);
  84. 84 : }
  85. 85 : }
  86. 86 : return obj;
  87. 87 : };
  88. 88 :
  89. 89 : /**
  90. 90 : * Comments that can be used to recollect the operation performed on the resource object.
  91. 91 : * @member {String} comments
  92. 92 : */
  93. 93 : exports.prototype['comments'] = undefined;
  94. 94 : /**
  95. 95 : * The additional information or meta-information that EBPP can accept, maintain and transmit back to the client.
  96. 96 : * @member {Object.<String, String>} custom_fields
  97. 97 : */
  98. 98 : exports.prototype['custom_fields'] = undefined;
  99. 99 : /**
  100. 100 : * @member {module:models/FeeRequest} fee
  101. 101 : */
  102. 102 : exports.prototype['fee'] = undefined;
  103. 103 : /**
  104. 104 : * The amount being paid.
  105. 105 : * @member {String} amount
  106. 106 : */
  107. 107 : exports.prototype['amount'] = undefined;
  108. 108 : /**
  109. 109 : * @member {String} card_cvv_number
  110. 110 : */
  111. 111 : exports.prototype['card_cvv_number'] = undefined;
  112. 112 : /**
  113. 113 : * The date on which the payment is scheduled to be made. It must be in ISO8601 full-date format, namely, YYYY-MM-DD.
  114. 114 : * @member {String} payment_date
  115. 115 : */
  116. 116 : exports.prototype['payment_date'] = undefined;
  117. 117 : /**
  118. 118 : * The date on which the biller wants the payment to be settled. It must be in ISO8601 full-date format, namely, YYYY-MM-DD.
  119. 119 : * @member {String} payment_request_date
  120. 120 : */
  121. 121 : exports.prototype['payment_request_date'] = undefined;
  122. 122 : /**
  123. 123 : * The type of amount, as per the bill/statement, that is being paid. The payment amount is derived from the amount type selected for the payment. This defaults to other.
  124. 124 : * @member {module:models/UpdatePaymentRequest.PaymentAmountTypeEnum} payment_amount_type
  125. 125 : */
  126. 126 : exports.prototype['payment_amount_type'] = undefined;
  127. 127 : /**
  128. 128 : * @member {module:models/UpdatePaymentFundingAccountMinimalRequest} funding_account
  129. 129 : */
  130. 130 : exports.prototype['funding_account'] = undefined;
  131. 131 :
  132. 132 :
  133. 133 : /**
  134. 134 : * Allowed values for the <code>payment_amount_type</code> property.
  135. 135 : * @enum {String}
  136. 136 : * @readonly
  137. 137 : */
  138. 138 : exports.PaymentAmountTypeEnum = {
  139. 139 : /**
  140. 140 : * value: "current_balance"
  141. 141 : * @const
  142. 142 : */
  143. 143 : "current_balance": "current_balance",
  144. 144 : /**
  145. 145 : * value: "minimum_payment_due"
  146. 146 : * @const
  147. 147 : */
  148. 148 : "minimum_payment_due": "minimum_payment_due",
  149. 149 : /**
  150. 150 : * value: "past_payment_due"
  151. 151 : * @const
  152. 152 : */
  153. 153 : "past_payment_due": "past_payment_due",
  154. 154 : /**
  155. 155 : * value: "statement_balance"
  156. 156 : * @const
  157. 157 : */
  158. 158 : "statement_balance": "statement_balance",
  159. 159 : /**
  160. 160 : * value: "discounted_amount"
  161. 161 : * @const
  162. 162 : */
  163. 163 : "discounted_amount": "discounted_amount",
  164. 164 : /**
  165. 165 : * value: "penalty_amount"
  166. 166 : * @const
  167. 167 : */
  168. 168 : "penalty_amount": "penalty_amount",
  169. 169 : /**
  170. 170 : * value: "other"
  171. 171 : * @const
  172. 172 : */
  173. 173 : "other": "other" };
  174. 174 :
  175. 175 :
  176. 176 : return exports;
  177. 177 : }));
  178. 178 :
  179. 179 :