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/AuditInfoVo', 'models/CustomerAccountResponse', 'models/FeeResponse', 'models/FundingAccountResponse', 'models/PaymentNetworkResponseVo', 'models/SimplePaymentCustomerResponse'], 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('./AuditInfoVo'), require('./CustomerAccountResponse'), require('./FeeResponse'), require('./FundingAccountResponse'), require('./PaymentNetworkResponseVo'), require('./SimplePaymentCustomerResponse'));
  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.SimplePaymentResponse = factory(root.OrbipayPaymentsapiClient.ApiClient, root.OrbipayPaymentsapiClient.AuditInfoVo, root.OrbipayPaymentsapiClient.CustomerAccountResponse, root.OrbipayPaymentsapiClient.FeeResponse, root.OrbipayPaymentsapiClient.FundingAccountResponse, root.OrbipayPaymentsapiClient.PaymentNetworkResponseVo, root.OrbipayPaymentsapiClient.SimplePaymentCustomerResponse);
  14. 14 : }
  15. 15 : }(this, function(ApiClient, AuditInfoVo, CustomerAccountResponse, FeeResponse, FundingAccountResponse, PaymentNetworkResponseVo, SimplePaymentCustomerResponse) {
  16. 16 : 'use strict';
  17. 17 :
  18. 18 :
  19. 19 :
  20. 20 :
  21. 21 : /**
  22. 22 : * The SimplePaymentResponse model module.
  23. 23 : * @module models/SimplePaymentResponse
  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>SimplePaymentResponse</code>.
  30. 30 : * @alias module:models/SimplePaymentResponse
  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 :
  49. 49 :
  50. 50 :
  51. 51 :
  52. 52 :
  53. 53 :
  54. 54 :
  55. 55 :
  56. 56 :
  57. 57 :
  58. 58 :
  59. 59 :
  60. 60 :
  61. 61 :
  62. 62 : };
  63. 63 :
  64. 64 : /**
  65. 65 : * Constructs a <code>SimplePaymentResponse</code> from a plain JavaScript object, optionally creating a new instance.
  66. 66 : * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
  67. 67 : * @param {Object} data The plain JavaScript object bearing properties of interest.
  68. 68 : * @param {module:models/SimplePaymentResponse} obj Optional instance to populate.
  69. 69 : * @return {module:models/SimplePaymentResponse} The populated <code>SimplePaymentResponse</code> instance.
  70. 70 : */
  71. 71 : exports.constructFromObject = function(data, obj) {
  72. 72 : if (data) {
  73. 73 : obj = obj || new exports();
  74. 74 :
  75. 75 : if (data.hasOwnProperty('id')) {
  76. 76 : obj['id'] = ApiClient.convertToType(data['id'], 'String');
  77. 77 : }
  78. 78 : if (data.hasOwnProperty('url')) {
  79. 79 : obj['url'] = ApiClient.convertToType(data['url'], 'String');
  80. 80 : }
  81. 81 : if (data.hasOwnProperty('fee')) {
  82. 82 : obj['fee'] = FeeResponse.constructFromObject(data['fee']);
  83. 83 : }
  84. 84 : if (data.hasOwnProperty('status')) {
  85. 85 : obj['status'] = ApiClient.convertToType(data['status'], 'String');
  86. 86 : }
  87. 87 : if (data.hasOwnProperty('payment_method')) {
  88. 88 : obj['payment_method'] = ApiClient.convertToType(data['payment_method'], 'String');
  89. 89 : }
  90. 90 : if (data.hasOwnProperty('confirmation_number')) {
  91. 91 : obj['confirmation_number'] = ApiClient.convertToType(data['confirmation_number'], 'String');
  92. 92 : }
  93. 93 : if (data.hasOwnProperty('custom_fields')) {
  94. 94 : obj['custom_fields'] = ApiClient.convertToType(data['custom_fields'], {'String': 'String'});
  95. 95 : }
  96. 96 : if (data.hasOwnProperty('currency_code3d')) {
  97. 97 : obj['currency_code3d'] = ApiClient.convertToType(data['currency_code3d'], 'String');
  98. 98 : }
  99. 99 : if (data.hasOwnProperty('amount')) {
  100. 100 : obj['amount'] = ApiClient.convertToType(data['amount'], 'String');
  101. 101 : }
  102. 102 : if (data.hasOwnProperty('card_cvv_number')) {
  103. 103 : obj['card_cvv_number'] = ApiClient.convertToType(data['card_cvv_number'], 'String');
  104. 104 : }
  105. 105 : if (data.hasOwnProperty('payment_date')) {
  106. 106 : obj['payment_date'] = ApiClient.convertToType(data['payment_date'], 'String');
  107. 107 : }
  108. 108 : if (data.hasOwnProperty('payment_schedule_type')) {
  109. 109 : obj['payment_schedule_type'] = ApiClient.convertToType(data['payment_schedule_type'], 'String');
  110. 110 : }
  111. 111 : if (data.hasOwnProperty('payment_request_date')) {
  112. 112 : obj['payment_request_date'] = ApiClient.convertToType(data['payment_request_date'], 'String');
  113. 113 : }
  114. 114 : if (data.hasOwnProperty('payment_amount_type')) {
  115. 115 : obj['payment_amount_type'] = ApiClient.convertToType(data['payment_amount_type'], 'String');
  116. 116 : }
  117. 117 : if (data.hasOwnProperty('payment_reference')) {
  118. 118 : obj['payment_reference'] = ApiClient.convertToType(data['payment_reference'], 'String');
  119. 119 : }
  120. 120 : if (data.hasOwnProperty('expected_payment_settlement_date')) {
  121. 121 : obj['expected_payment_settlement_date'] = ApiClient.convertToType(data['expected_payment_settlement_date'], 'String');
  122. 122 : }
  123. 123 : if (data.hasOwnProperty('payment_entry_date')) {
  124. 124 : obj['payment_entry_date'] = ApiClient.convertToType(data['payment_entry_date'], 'String');
  125. 125 : }
  126. 126 : if (data.hasOwnProperty('payment_return_date')) {
  127. 127 : obj['payment_return_date'] = ApiClient.convertToType(data['payment_return_date'], 'String');
  128. 128 : }
  129. 129 : if (data.hasOwnProperty('return_code')) {
  130. 130 : obj['return_code'] = ApiClient.convertToType(data['return_code'], 'String');
  131. 131 : }
  132. 132 : if (data.hasOwnProperty('payment_notification_email')) {
  133. 133 : obj['payment_notification_email'] = ApiClient.convertToType(data['payment_notification_email'], 'String');
  134. 134 : }
  135. 135 : if (data.hasOwnProperty('comments')) {
  136. 136 : obj['comments'] = ApiClient.convertToType(data['comments'], 'String');
  137. 137 : }
  138. 138 : if (data.hasOwnProperty('customer')) {
  139. 139 : obj['customer'] = SimplePaymentCustomerResponse.constructFromObject(data['customer']);
  140. 140 : }
  141. 141 : if (data.hasOwnProperty('funding_account')) {
  142. 142 : obj['funding_account'] = FundingAccountResponse.constructFromObject(data['funding_account']);
  143. 143 : }
  144. 144 : if (data.hasOwnProperty('customer_account')) {
  145. 145 : obj['customer_account'] = CustomerAccountResponse.constructFromObject(data['customer_account']);
  146. 146 : }
  147. 147 : if (data.hasOwnProperty('payment_network_response')) {
  148. 148 : obj['payment_network_response'] = PaymentNetworkResponseVo.constructFromObject(data['payment_network_response']);
  149. 149 : }
  150. 150 : if (data.hasOwnProperty('audit_info')) {
  151. 151 : obj['audit_info'] = AuditInfoVo.constructFromObject(data['audit_info']);
  152. 152 : }
  153. 153 : }
  154. 154 : return obj;
  155. 155 : };
  156. 156 :
  157. 157 : /**
  158. 158 : * The unique identifier assigned by EBPP to the payment.
  159. 159 : * @member {String} id
  160. 160 : */
  161. 161 : exports.prototype['id'] = undefined;
  162. 162 : /**
  163. 163 : * This URL fetches the details of payment.
  164. 164 : * @member {String} url
  165. 165 : */
  166. 166 : exports.prototype['url'] = undefined;
  167. 167 : /**
  168. 168 : * @member {module:models/FeeResponse} fee
  169. 169 : */
  170. 170 : exports.prototype['fee'] = undefined;
  171. 171 : /**
  172. 172 : * The status of the payment.
  173. 173 : * @member {module:models/SimplePaymentResponse.StatusEnum} status
  174. 174 : */
  175. 175 : exports.prototype['status'] = undefined;
  176. 176 : /**
  177. 177 : * The fulfillment method for the payment.
  178. 178 : * @member {module:models/SimplePaymentResponse.PaymentMethodEnum} payment_method
  179. 179 : */
  180. 180 : exports.prototype['payment_method'] = undefined;
  181. 181 : /**
  182. 182 : * The confirmation number or reference provided to the customer for the payment.
  183. 183 : * @member {String} confirmation_number
  184. 184 : */
  185. 185 : exports.prototype['confirmation_number'] = undefined;
  186. 186 : /**
  187. 187 : * 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.
  188. 188 : * @member {Object.<String, String>} custom_fields
  189. 189 : */
  190. 190 : exports.prototype['custom_fields'] = undefined;
  191. 191 : /**
  192. 192 : * The three-letter currency code in the ISO4217 format, in uppercase, for the card account. It must be a currency supported by EBPP. This defaults to USD.
  193. 193 : * @member {String} currency_code3d
  194. 194 : */
  195. 195 : exports.prototype['currency_code3d'] = undefined;
  196. 196 : /**
  197. 197 : * 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.
  198. 198 : * @member {String} amount
  199. 199 : */
  200. 200 : exports.prototype['amount'] = undefined;
  201. 201 : /**
  202. 202 : * This is never returned by EBPP. This needs to be passed to EBPP when making or editing a payment with a card funding account.
  203. 203 : * @member {String} card_cvv_number
  204. 204 : */
  205. 205 : exports.prototype['card_cvv_number'] = undefined;
  206. 206 : /**
  207. 207 : * The date on which the payment is scheduled to be made. It must be in ISO8601 full-date format, namely, YYYY-MM-DD.
  208. 208 : * @member {String} payment_date
  209. 209 : */
  210. 210 : exports.prototype['payment_date'] = undefined;
  211. 211 : /**
  212. 212 : * The schedule type for the payment. This defaults to one_time_payment.
  213. 213 : * @member {module:models/SimplePaymentResponse.PaymentScheduleTypeEnum} payment_schedule_type
  214. 214 : */
  215. 215 : exports.prototype['payment_schedule_type'] = undefined;
  216. 216 : /**
  217. 217 : * 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.
  218. 218 : * @member {String} payment_request_date
  219. 219 : */
  220. 220 : exports.prototype['payment_request_date'] = undefined;
  221. 221 : /**
  222. 222 : * 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.
  223. 223 : * @member {module:models/SimplePaymentResponse.PaymentAmountTypeEnum} payment_amount_type
  224. 224 : */
  225. 225 : exports.prototype['payment_amount_type'] = undefined;
  226. 226 : /**
  227. 227 : * The unique identifier in the client system for the payment.
  228. 228 : * @member {String} payment_reference
  229. 229 : */
  230. 230 : exports.prototype['payment_reference'] = undefined;
  231. 231 : /**
  232. 232 : * The date on which the payment is expected to be settled with the biller. It must be in ISO8601 full-date format, namely, YYYY-MM-DD.
  233. 233 : * @member {String} expected_payment_settlement_date
  234. 234 : */
  235. 235 : exports.prototype['expected_payment_settlement_date'] = undefined;
  236. 236 : /**
  237. 237 : * The date on which the payment is captured in EBPP. It must be in ISO8601 full-date format, namely, YYYY-MM-DD.
  238. 238 : * @member {String} payment_entry_date
  239. 239 : */
  240. 240 : exports.prototype['payment_entry_date'] = undefined;
  241. 241 : /**
  242. 242 : * The date on which the ACH returns is received by EBPP.
  243. 243 : * @member {String} payment_return_date
  244. 244 : */
  245. 245 : exports.prototype['payment_return_date'] = undefined;
  246. 246 : /**
  247. 247 : * The ACH return code or the chargeback code received from Visa/Mastercard, in the event of returned payments.
  248. 248 : * @member {String} return_code
  249. 249 : */
  250. 250 : exports.prototype['return_code'] = undefined;
  251. 251 : /**
  252. 252 : * 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.
  253. 253 : * @member {String} payment_notification_email
  254. 254 : */
  255. 255 : exports.prototype['payment_notification_email'] = undefined;
  256. 256 : /**
  257. 257 : * 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.
  258. 258 : * @member {String} comments
  259. 259 : */
  260. 260 : exports.prototype['comments'] = undefined;
  261. 261 : /**
  262. 262 : * @member {module:models/SimplePaymentCustomerResponse} customer
  263. 263 : */
  264. 264 : exports.prototype['customer'] = undefined;
  265. 265 : /**
  266. 266 : * @member {module:models/FundingAccountResponse} funding_account
  267. 267 : */
  268. 268 : exports.prototype['funding_account'] = undefined;
  269. 269 : /**
  270. 270 : * @member {module:models/CustomerAccountResponse} customer_account
  271. 271 : */
  272. 272 : exports.prototype['customer_account'] = undefined;
  273. 273 : /**
  274. 274 : * @member {module:models/PaymentNetworkResponseVo} payment_network_response
  275. 275 : */
  276. 276 : exports.prototype['payment_network_response'] = undefined;
  277. 277 : /**
  278. 278 : * @member {module:models/AuditInfoVo} audit_info
  279. 279 : */
  280. 280 : exports.prototype['audit_info'] = undefined;
  281. 281 :
  282. 282 :
  283. 283 : /**
  284. 284 : * Allowed values for the <code>status</code> property.
  285. 285 : * @enum {String}
  286. 286 : * @readonly
  287. 287 : */
  288. 288 : exports.StatusEnum = {
  289. 289 : /**
  290. 290 : * value: "scheduled"
  291. 291 : * @const
  292. 292 : */
  293. 293 : "scheduled": "scheduled",
  294. 294 : /**
  295. 295 : * value: "cancelled"
  296. 296 : * @const
  297. 297 : */
  298. 298 : "cancelled": "cancelled",
  299. 299 : /**
  300. 300 : * value: "processing"
  301. 301 : * @const
  302. 302 : */
  303. 303 : "processing": "processing",
  304. 304 : /**
  305. 305 : * value: "processed"
  306. 306 : * @const
  307. 307 : */
  308. 308 : "processed": "processed",
  309. 309 : /**
  310. 310 : * value: "returned"
  311. 311 : * @const
  312. 312 : */
  313. 313 : "returned": "returned",
  314. 314 : /**
  315. 315 : * value: "declined"
  316. 316 : * @const
  317. 317 : */
  318. 318 : "declined": "declined",
  319. 319 : /**
  320. 320 : * value: "disputed"
  321. 321 : * @const
  322. 322 : */
  323. 323 : "disputed": "disputed",
  324. 324 : /**
  325. 325 : * value: "error"
  326. 326 : * @const
  327. 327 : */
  328. 328 : "error": "error" };
  329. 329 :
  330. 330 : /**
  331. 331 : * Allowed values for the <code>payment_method</code> property.
  332. 332 : * @enum {String}
  333. 333 : * @readonly
  334. 334 : */
  335. 335 : exports.PaymentMethodEnum = {
  336. 336 : /**
  337. 337 : * value: "ach"
  338. 338 : * @const
  339. 339 : */
  340. 340 : "ach": "ach",
  341. 341 : /**
  342. 342 : * value: "check"
  343. 343 : * @const
  344. 344 : */
  345. 345 : "check": "check",
  346. 346 : /**
  347. 347 : * value: "visa_debit"
  348. 348 : * @const
  349. 349 : */
  350. 350 : "visa_debit": "visa_debit",
  351. 351 : /**
  352. 352 : * value: "pinless_debit"
  353. 353 : * @const
  354. 354 : */
  355. 355 : "pinless_debit": "pinless_debit",
  356. 356 : /**
  357. 357 : * value: "master_debit"
  358. 358 : * @const
  359. 359 : */
  360. 360 : "master_debit": "master_debit",
  361. 361 : /**
  362. 362 : * value: "amex_credit"
  363. 363 : * @const
  364. 364 : */
  365. 365 : "amex_credit": "amex_credit",
  366. 366 : /**
  367. 367 : * value: "discover_credit"
  368. 368 : * @const
  369. 369 : */
  370. 370 : "discover_credit": "discover_credit",
  371. 371 : /**
  372. 372 : * value: "visa_credit"
  373. 373 : * @const
  374. 374 : */
  375. 375 : "visa_credit": "visa_credit",
  376. 376 : /**
  377. 377 : * value: "master_credit"
  378. 378 : * @const
  379. 379 : */
  380. 380 : "master_credit": "master_credit",
  381. 381 : /**
  382. 382 : * value: "cash"
  383. 383 : * @const
  384. 384 : */
  385. 385 : "cash": "cash",
  386. 386 : /**
  387. 387 : * value: "discover_debit"
  388. 388 : * @const
  389. 389 : */
  390. 390 : "discover_debit": "discover_debit" };
  391. 391 :
  392. 392 : /**
  393. 393 : * Allowed values for the <code>payment_schedule_type</code> property.
  394. 394 : * @enum {String}
  395. 395 : * @readonly
  396. 396 : */
  397. 397 : exports.PaymentScheduleTypeEnum = {
  398. 398 : /**
  399. 399 : * value: "one_time_payment"
  400. 400 : * @const
  401. 401 : */
  402. 402 : "one_time_payment": "one_time_payment",
  403. 403 : /**
  404. 404 : * value: "autopay_generated_payment"
  405. 405 : * @const
  406. 406 : */
  407. 407 : "autopay_generated_payment": "autopay_generated_payment",
  408. 408 : /**
  409. 409 : * value: "variable_recurring_generated_payment"
  410. 410 : * @const
  411. 411 : */
  412. 412 : "variable_recurring_generated_payment": "variable_recurring_generated_payment",
  413. 413 : /**
  414. 414 : * value: "payment_plan_generated"
  415. 415 : * @const
  416. 416 : */
  417. 417 : "payment_plan_generated": "payment_plan_generated" };
  418. 418 :
  419. 419 : /**
  420. 420 : * Allowed values for the <code>payment_amount_type</code> property.
  421. 421 : * @enum {String}
  422. 422 : * @readonly
  423. 423 : */
  424. 424 : exports.PaymentAmountTypeEnum = {
  425. 425 : /**
  426. 426 : * value: "current_balance"
  427. 427 : * @const
  428. 428 : */
  429. 429 : "current_balance": "current_balance",
  430. 430 : /**
  431. 431 : * value: "minimum_payment_due"
  432. 432 : * @const
  433. 433 : */
  434. 434 : "minimum_payment_due": "minimum_payment_due",
  435. 435 : /**
  436. 436 : * value: "past_payment_due"
  437. 437 : * @const
  438. 438 : */
  439. 439 : "past_payment_due": "past_payment_due",
  440. 440 : /**
  441. 441 : * value: "statement_balance"
  442. 442 : * @const
  443. 443 : */
  444. 444 : "statement_balance": "statement_balance",
  445. 445 : /**
  446. 446 : * value: "discounted_amount"
  447. 447 : * @const
  448. 448 : */
  449. 449 : "discounted_amount": "discounted_amount",
  450. 450 : /**
  451. 451 : * value: "penalty_amount"
  452. 452 : * @const
  453. 453 : */
  454. 454 : "penalty_amount": "penalty_amount",
  455. 455 : /**
  456. 456 : * value: "other"
  457. 457 : * @const
  458. 458 : */
  459. 459 : "other": "other" };
  460. 460 :
  461. 461 :
  462. 462 : return exports;
  463. 463 : }));
  464. 464 :
  465. 465 :