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