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/CustomerAccountMinimalRequest', 'models/CustomerMinimalRequest', 'models/FeeRequest', 'models/FundingAccountMinimalRequest'], 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('./CustomerAccountMinimalRequest'), require('./CustomerMinimalRequest'), require('./FeeRequest'), require('./FundingAccountMinimalRequest'));
  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.CreatePaymentRequest = factory(root.OrbipayPaymentsapiClient.ApiClient, root.OrbipayPaymentsapiClient.CustomerAccountMinimalRequest, root.OrbipayPaymentsapiClient.CustomerMinimalRequest, root.OrbipayPaymentsapiClient.FeeRequest, root.OrbipayPaymentsapiClient.FundingAccountMinimalRequest);
  14. 14 : }
  15. 15 : }(this, function(ApiClient, CustomerAccountMinimalRequest, CustomerMinimalRequest, FeeRequest, FundingAccountMinimalRequest) {
  16. 16 : 'use strict';
  17. 17 :
  18. 18 :
  19. 19 :
  20. 20 :
  21. 21 : /**
  22. 22 : * The CreatePaymentRequest model module.
  23. 23 : * @module models/CreatePaymentRequest
  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>CreatePaymentRequest</code>.
  30. 30 : * @alias module:models/CreatePaymentRequest
  31. 31 : * @class
  32. 32 : * @param customer {module:models/CustomerMinimalRequest}
  33. 33 : * @param funding_account {module:models/FundingAccountMinimalRequest}
  34. 34 : * @param customer_account {module:models/CustomerAccountMinimalRequest}
  35. 35 : */
  36. 36 : var exports = function(customer, funding_account, customer_account) {
  37. 37 : var _this = this;
  38. 38 :
  39. 39 :
  40. 40 :
  41. 41 :
  42. 42 :
  43. 43 :
  44. 44 :
  45. 45 : _this['customer'] = customer;
  46. 46 : _this['funding_account'] = funding_account;
  47. 47 : _this['customer_account'] = customer_account;
  48. 48 :
  49. 49 :
  50. 50 :
  51. 51 :
  52. 52 : };
  53. 53 :
  54. 54 : /**
  55. 55 : * Constructs a <code>CreatePaymentRequest</code> from a plain JavaScript object, optionally creating a new instance.
  56. 56 : * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
  57. 57 : * @param {Object} data The plain JavaScript object bearing properties of interest.
  58. 58 : * @param {module:models/CreatePaymentRequest} obj Optional instance to populate.
  59. 59 : * @return {module:models/CreatePaymentRequest} The populated <code>CreatePaymentRequest</code> instance.
  60. 60 : */
  61. 61 : exports.constructFromObject = function(data, obj) {
  62. 62 : if (data) {
  63. 63 : obj = obj || new exports();
  64. 64 :
  65. 65 : if (data.hasOwnProperty('amount')) {
  66. 66 : obj['amount'] = ApiClient.convertToType(data['amount'], 'String');
  67. 67 : }
  68. 68 : if (data.hasOwnProperty('card_cvv_number')) {
  69. 69 : obj['card_cvv_number'] = ApiClient.convertToType(data['card_cvv_number'], 'String');
  70. 70 : }
  71. 71 : if (data.hasOwnProperty('payment_date')) {
  72. 72 : obj['payment_date'] = ApiClient.convertToType(data['payment_date'], 'String');
  73. 73 : }
  74. 74 : if (data.hasOwnProperty('payment_request_date')) {
  75. 75 : obj['payment_request_date'] = ApiClient.convertToType(data['payment_request_date'], 'String');
  76. 76 : }
  77. 77 : if (data.hasOwnProperty('payment_amount_type')) {
  78. 78 : obj['payment_amount_type'] = ApiClient.convertToType(data['payment_amount_type'], 'String');
  79. 79 : }
  80. 80 : if (data.hasOwnProperty('fee')) {
  81. 81 : obj['fee'] = FeeRequest.constructFromObject(data['fee']);
  82. 82 : }
  83. 83 : if (data.hasOwnProperty('customer')) {
  84. 84 : obj['customer'] = CustomerMinimalRequest.constructFromObject(data['customer']);
  85. 85 : }
  86. 86 : if (data.hasOwnProperty('funding_account')) {
  87. 87 : obj['funding_account'] = FundingAccountMinimalRequest.constructFromObject(data['funding_account']);
  88. 88 : }
  89. 89 : if (data.hasOwnProperty('customer_account')) {
  90. 90 : obj['customer_account'] = CustomerAccountMinimalRequest.constructFromObject(data['customer_account']);
  91. 91 : }
  92. 92 : if (data.hasOwnProperty('payment_reference')) {
  93. 93 : obj['payment_reference'] = ApiClient.convertToType(data['payment_reference'], 'String');
  94. 94 : }
  95. 95 : if (data.hasOwnProperty('payment_notification_email')) {
  96. 96 : obj['payment_notification_email'] = ApiClient.convertToType(data['payment_notification_email'], 'String');
  97. 97 : }
  98. 98 : if (data.hasOwnProperty('comments')) {
  99. 99 : obj['comments'] = ApiClient.convertToType(data['comments'], 'String');
  100. 100 : }
  101. 101 : if (data.hasOwnProperty('custom_fields')) {
  102. 102 : obj['custom_fields'] = ApiClient.convertToType(data['custom_fields'], {'String': 'String'});
  103. 103 : }
  104. 104 : }
  105. 105 : return obj;
  106. 106 : };
  107. 107 :
  108. 108 : /**
  109. 109 : * The amount being paid. In case the payment_amount_type is 'discounted_amount', 'penalty_amount' or 'other', the amount needs to be specified. In other cases, this is derived from the payment_amount_type.
  110. 110 : * @member {String} amount
  111. 111 : */
  112. 112 : exports.prototype['amount'] = undefined;
  113. 113 : /**
  114. 114 : * This is never returned by EBPP. This needs to be passed to EBPP when making or editing a payment with a card funding account.
  115. 115 : * @member {String} card_cvv_number
  116. 116 : */
  117. 117 : exports.prototype['card_cvv_number'] = undefined;
  118. 118 : /**
  119. 119 : * The date on which the payment is scheduled to be made. It must be in ISO8601 full-date format, namely, YYYY-MM-DD.
  120. 120 : * @member {String} payment_date
  121. 121 : */
  122. 122 : exports.prototype['payment_date'] = undefined;
  123. 123 : /**
  124. 124 : * The date on which the biller wants the payment to be settled. It must be in ISO8601 full-date format, namely, YYYY-MM-DD. This is applicable only if the client has opted for it.
  125. 125 : * @member {String} payment_request_date
  126. 126 : */
  127. 127 : exports.prototype['payment_request_date'] = undefined;
  128. 128 : /**
  129. 129 : * 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.
  130. 130 : * @member {module:models/CreatePaymentRequest.PaymentAmountTypeEnum} payment_amount_type
  131. 131 : */
  132. 132 : exports.prototype['payment_amount_type'] = undefined;
  133. 133 : /**
  134. 134 : * @member {module:models/FeeRequest} fee
  135. 135 : */
  136. 136 : exports.prototype['fee'] = undefined;
  137. 137 : /**
  138. 138 : * @member {module:models/CustomerMinimalRequest} customer
  139. 139 : */
  140. 140 : exports.prototype['customer'] = undefined;
  141. 141 : /**
  142. 142 : * @member {module:models/FundingAccountMinimalRequest} funding_account
  143. 143 : */
  144. 144 : exports.prototype['funding_account'] = undefined;
  145. 145 : /**
  146. 146 : * @member {module:models/CustomerAccountMinimalRequest} customer_account
  147. 147 : */
  148. 148 : exports.prototype['customer_account'] = undefined;
  149. 149 : /**
  150. 150 : * The unique identifier in the client system for the payment.
  151. 151 : * @member {String} payment_reference
  152. 152 : */
  153. 153 : exports.prototype['payment_reference'] = undefined;
  154. 154 : /**
  155. 155 : * The email address of the customer to which payment notifications from EBPP will be sent. The notifications will be sent to customer email in case if this field is not present.
  156. 156 : * @member {String} payment_notification_email
  157. 157 : */
  158. 158 : exports.prototype['payment_notification_email'] = undefined;
  159. 159 : /**
  160. 160 : * Comments that can be used to recollect the operation performed on the resource object. API clients need to ensure that no sensitive information is passed in the memo. Alacriti (EBPP) is not responsible for the security of any sensitive information that may be passed as part of the memo.
  161. 161 : * @member {String} comments
  162. 162 : */
  163. 163 : exports.prototype['comments'] = undefined;
  164. 164 : /**
  165. 165 : * The additional information or meta-information that EBPP can accept, maintain and transmit back to the client. The custom fields need to be configured with EBPP before they can be accepted. EBPP would reject custom fields that are not pre-configured. Please contact <a href = \"mailto: support@billerpayments.com\">support@billerpayments.com</a> for more information on configuring and using custom fields. Only the custom fields enabled for the client, in EBPP, would be accepted in the requests.
  166. 166 : * @member {Object.<String, String>} custom_fields
  167. 167 : */
  168. 168 : exports.prototype['custom_fields'] = undefined;
  169. 169 :
  170. 170 :
  171. 171 : /**
  172. 172 : * Allowed values for the <code>payment_amount_type</code> property.
  173. 173 : * @enum {String}
  174. 174 : * @readonly
  175. 175 : */
  176. 176 : exports.PaymentAmountTypeEnum = {
  177. 177 : /**
  178. 178 : * value: "current_balance"
  179. 179 : * @const
  180. 180 : */
  181. 181 : "current_balance": "current_balance",
  182. 182 : /**
  183. 183 : * value: "minimum_payment_due"
  184. 184 : * @const
  185. 185 : */
  186. 186 : "minimum_payment_due": "minimum_payment_due",
  187. 187 : /**
  188. 188 : * value: "past_payment_due"
  189. 189 : * @const
  190. 190 : */
  191. 191 : "past_payment_due": "past_payment_due",
  192. 192 : /**
  193. 193 : * value: "statement_balance"
  194. 194 : * @const
  195. 195 : */
  196. 196 : "statement_balance": "statement_balance",
  197. 197 : /**
  198. 198 : * value: "discounted_amount"
  199. 199 : * @const
  200. 200 : */
  201. 201 : "discounted_amount": "discounted_amount",
  202. 202 : /**
  203. 203 : * value: "penalty_amount"
  204. 204 : * @const
  205. 205 : */
  206. 206 : "penalty_amount": "penalty_amount",
  207. 207 : /**
  208. 208 : * value: "other"
  209. 209 : * @const
  210. 210 : */
  211. 211 : "other": "other" };
  212. 212 :
  213. 213 :
  214. 214 : return exports;
  215. 215 : }));
  216. 216 :
  217. 217 :