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/RecordedPaymentFundingAccount', '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('./RecordedPaymentFundingAccount'), 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.RecordedPaymentResponse = factory(root.OrbipayPaymentsapiClient.ApiClient, root.OrbipayPaymentsapiClient.AuditInfoVo, root.OrbipayPaymentsapiClient.CustomerAccountResponse, root.OrbipayPaymentsapiClient.FeeResponse, root.OrbipayPaymentsapiClient.RecordedPaymentFundingAccount, root.OrbipayPaymentsapiClient.SimplePaymentCustomerResponse);
  14. 14 : }
  15. 15 : }(this, function(ApiClient, AuditInfoVo, CustomerAccountResponse, FeeResponse, RecordedPaymentFundingAccount, SimplePaymentCustomerResponse) {
  16. 16 : 'use strict';
  17. 17 :
  18. 18 :
  19. 19 :
  20. 20 :
  21. 21 : /**
  22. 22 : * The RecordedPaymentResponse model module.
  23. 23 : * @module models/RecordedPaymentResponse
  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>RecordedPaymentResponse</code>.
  30. 30 : * @alias module:models/RecordedPaymentResponse
  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 : * Constructs a <code>RecordedPaymentResponse</code> from a plain JavaScript object, optionally creating a new instance.
  62. 62 : * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
  63. 63 : * @param {Object} data The plain JavaScript object bearing properties of interest.
  64. 64 : * @param {module:models/RecordedPaymentResponse} obj Optional instance to populate.
  65. 65 : * @return {module:models/RecordedPaymentResponse} The populated <code>RecordedPaymentResponse</code> instance.
  66. 66 : */
  67. 67 : exports.constructFromObject = function(data, obj) {
  68. 68 : if (data) {
  69. 69 : obj = obj || new exports();
  70. 70 :
  71. 71 : if (data.hasOwnProperty('id')) {
  72. 72 : obj['id'] = ApiClient.convertToType(data['id'], 'String');
  73. 73 : }
  74. 74 : if (data.hasOwnProperty('url')) {
  75. 75 : obj['url'] = ApiClient.convertToType(data['url'], 'String');
  76. 76 : }
  77. 77 : if (data.hasOwnProperty('fee')) {
  78. 78 : obj['fee'] = FeeResponse.constructFromObject(data['fee']);
  79. 79 : }
  80. 80 : if (data.hasOwnProperty('status')) {
  81. 81 : obj['status'] = ApiClient.convertToType(data['status'], 'String');
  82. 82 : }
  83. 83 : if (data.hasOwnProperty('payment_method')) {
  84. 84 : obj['payment_method'] = ApiClient.convertToType(data['payment_method'], 'String');
  85. 85 : }
  86. 86 : if (data.hasOwnProperty('token')) {
  87. 87 : obj['token'] = ApiClient.convertToType(data['token'], 'String');
  88. 88 : }
  89. 89 : if (data.hasOwnProperty('confirmation_number')) {
  90. 90 : obj['confirmation_number'] = ApiClient.convertToType(data['confirmation_number'], 'String');
  91. 91 : }
  92. 92 : if (data.hasOwnProperty('custom_fields')) {
  93. 93 : obj['custom_fields'] = ApiClient.convertToType(data['custom_fields'], {'String': 'String'});
  94. 94 : }
  95. 95 : if (data.hasOwnProperty('currency_code3d')) {
  96. 96 : obj['currency_code3d'] = ApiClient.convertToType(data['currency_code3d'], 'String');
  97. 97 : }
  98. 98 : if (data.hasOwnProperty('amount')) {
  99. 99 : obj['amount'] = ApiClient.convertToType(data['amount'], 'String');
  100. 100 : }
  101. 101 : if (data.hasOwnProperty('payment_date')) {
  102. 102 : obj['payment_date'] = ApiClient.convertToType(data['payment_date'], 'String');
  103. 103 : }
  104. 104 : if (data.hasOwnProperty('payment_schedule_type')) {
  105. 105 : obj['payment_schedule_type'] = ApiClient.convertToType(data['payment_schedule_type'], 'String');
  106. 106 : }
  107. 107 : if (data.hasOwnProperty('payment_amount_type')) {
  108. 108 : obj['payment_amount_type'] = ApiClient.convertToType(data['payment_amount_type'], 'String');
  109. 109 : }
  110. 110 : if (data.hasOwnProperty('payment_reference')) {
  111. 111 : obj['payment_reference'] = ApiClient.convertToType(data['payment_reference'], 'String');
  112. 112 : }
  113. 113 : if (data.hasOwnProperty('payment_entry_date')) {
  114. 114 : obj['payment_entry_date'] = ApiClient.convertToType(data['payment_entry_date'], 'String');
  115. 115 : }
  116. 116 : if (data.hasOwnProperty('payment_return_date')) {
  117. 117 : obj['payment_return_date'] = ApiClient.convertToType(data['payment_return_date'], 'String');
  118. 118 : }
  119. 119 : if (data.hasOwnProperty('comments')) {
  120. 120 : obj['comments'] = ApiClient.convertToType(data['comments'], 'String');
  121. 121 : }
  122. 122 : if (data.hasOwnProperty('return_code')) {
  123. 123 : obj['return_code'] = ApiClient.convertToType(data['return_code'], 'String');
  124. 124 : }
  125. 125 : if (data.hasOwnProperty('customer')) {
  126. 126 : obj['customer'] = SimplePaymentCustomerResponse.constructFromObject(data['customer']);
  127. 127 : }
  128. 128 : if (data.hasOwnProperty('funding_account')) {
  129. 129 : obj['funding_account'] = RecordedPaymentFundingAccount.constructFromObject(data['funding_account']);
  130. 130 : }
  131. 131 : if (data.hasOwnProperty('customer_account')) {
  132. 132 : obj['customer_account'] = CustomerAccountResponse.constructFromObject(data['customer_account']);
  133. 133 : }
  134. 134 : if (data.hasOwnProperty('audit_info')) {
  135. 135 : obj['audit_info'] = AuditInfoVo.constructFromObject(data['audit_info']);
  136. 136 : }
  137. 137 : }
  138. 138 : return obj;
  139. 139 : };
  140. 140 :
  141. 141 : /**
  142. 142 : * The unique identifier assigned by EBPP to the payment.
  143. 143 : * @member {String} id
  144. 144 : */
  145. 145 : exports.prototype['id'] = undefined;
  146. 146 : /**
  147. 147 : * This URL fetches the details of payment.
  148. 148 : * @member {String} url
  149. 149 : */
  150. 150 : exports.prototype['url'] = undefined;
  151. 151 : /**
  152. 152 : * @member {module:models/FeeResponse} fee
  153. 153 : */
  154. 154 : exports.prototype['fee'] = undefined;
  155. 155 : /**
  156. 156 : * The status of the payment.
  157. 157 : * @member {module:models/RecordedPaymentResponse.StatusEnum} status
  158. 158 : */
  159. 159 : exports.prototype['status'] = undefined;
  160. 160 : /**
  161. 161 : * The non fulfillment method for the payment.
  162. 162 : * @member {module:models/RecordedPaymentResponse.PaymentMethodEnum} payment_method
  163. 163 : */
  164. 164 : exports.prototype['payment_method'] = undefined;
  165. 165 : /**
  166. 166 : * The token is used to uniquely identify the payment, such as the POS token.
  167. 167 : * @member {String} token
  168. 168 : */
  169. 169 : exports.prototype['token'] = undefined;
  170. 170 : /**
  171. 171 : * The confirmation number or reference provided to the customer for the payment.
  172. 172 : * @member {String} confirmation_number
  173. 173 : */
  174. 174 : exports.prototype['confirmation_number'] = undefined;
  175. 175 : /**
  176. 176 : * 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.
  177. 177 : * @member {Object.<String, String>} custom_fields
  178. 178 : */
  179. 179 : exports.prototype['custom_fields'] = undefined;
  180. 180 : /**
  181. 181 : * 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.
  182. 182 : * @member {String} currency_code3d
  183. 183 : */
  184. 184 : exports.prototype['currency_code3d'] = undefined;
  185. 185 : /**
  186. 186 : * The amount being paid. In case the payment_amount_type is 'other', the amount needs to be specified. In other cases, this is derived from the payment_amount_type.
  187. 187 : * @member {String} amount
  188. 188 : */
  189. 189 : exports.prototype['amount'] = undefined;
  190. 190 : /**
  191. 191 : * The date on which the payment is scheduled to be made. It must be in ISO8601 full-date format, namely, YYYY-MM-DD.
  192. 192 : * @member {String} payment_date
  193. 193 : */
  194. 194 : exports.prototype['payment_date'] = undefined;
  195. 195 : /**
  196. 196 : * The schedule type for the payment. This defaults to one_time_payment.
  197. 197 : * @member {module:models/RecordedPaymentResponse.PaymentScheduleTypeEnum} payment_schedule_type
  198. 198 : */
  199. 199 : exports.prototype['payment_schedule_type'] = undefined;
  200. 200 : /**
  201. 201 : * 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.
  202. 202 : * @member {module:models/RecordedPaymentResponse.PaymentAmountTypeEnum} payment_amount_type
  203. 203 : */
  204. 204 : exports.prototype['payment_amount_type'] = undefined;
  205. 205 : /**
  206. 206 : * The unique identifier in the client system for the payment.
  207. 207 : * @member {String} payment_reference
  208. 208 : */
  209. 209 : exports.prototype['payment_reference'] = undefined;
  210. 210 : /**
  211. 211 : * The date on which the payment is captured in EBPP. It must be in ISO8601 full-date format, namely, YYYY-MM-DD.
  212. 212 : * @member {String} payment_entry_date
  213. 213 : */
  214. 214 : exports.prototype['payment_entry_date'] = undefined;
  215. 215 : /**
  216. 216 : * The date on which the ACH returns is received by EBPP.
  217. 217 : * @member {String} payment_return_date
  218. 218 : */
  219. 219 : exports.prototype['payment_return_date'] = undefined;
  220. 220 : /**
  221. 221 : * Comments that can be used to recollect the operation performed on the resource object.
  222. 222 : * @member {String} comments
  223. 223 : */
  224. 224 : exports.prototype['comments'] = undefined;
  225. 225 : /**
  226. 226 : * The ACH return code or the chargeback code received from Visa/Mastercard, in the event of returned payments.
  227. 227 : * @member {String} return_code
  228. 228 : */
  229. 229 : exports.prototype['return_code'] = undefined;
  230. 230 : /**
  231. 231 : * @member {module:models/SimplePaymentCustomerResponse} customer
  232. 232 : */
  233. 233 : exports.prototype['customer'] = undefined;
  234. 234 : /**
  235. 235 : * @member {module:models/RecordedPaymentFundingAccount} funding_account
  236. 236 : */
  237. 237 : exports.prototype['funding_account'] = undefined;
  238. 238 : /**
  239. 239 : * @member {module:models/CustomerAccountResponse} customer_account
  240. 240 : */
  241. 241 : exports.prototype['customer_account'] = undefined;
  242. 242 : /**
  243. 243 : * @member {module:models/AuditInfoVo} audit_info
  244. 244 : */
  245. 245 : exports.prototype['audit_info'] = undefined;
  246. 246 :
  247. 247 :
  248. 248 : /**
  249. 249 : * Allowed values for the <code>status</code> property.
  250. 250 : * @enum {String}
  251. 251 : * @readonly
  252. 252 : */
  253. 253 : exports.StatusEnum = {
  254. 254 : /**
  255. 255 : * value: "processed"
  256. 256 : * @const
  257. 257 : */
  258. 258 : "processed": "processed",
  259. 259 : /**
  260. 260 : * value: "cancelled"
  261. 261 : * @const
  262. 262 : */
  263. 263 : "cancelled": "cancelled" };
  264. 264 :
  265. 265 : /**
  266. 266 : * Allowed values for the <code>payment_method</code> property.
  267. 267 : * @enum {String}
  268. 268 : * @readonly
  269. 269 : */
  270. 270 : exports.PaymentMethodEnum = {
  271. 271 : /**
  272. 272 : * value: "cash"
  273. 273 : * @const
  274. 274 : */
  275. 275 : "cash": "cash",
  276. 276 : /**
  277. 277 : * value: "swiped_card"
  278. 278 : * @const
  279. 279 : */
  280. 280 : "swiped_card": "swiped_card",
  281. 281 : /**
  282. 282 : * value: "scanned_check"
  283. 283 : * @const
  284. 284 : */
  285. 285 : "scanned_check": "scanned_check" };
  286. 286 :
  287. 287 : /**
  288. 288 : * Allowed values for the <code>payment_schedule_type</code> property.
  289. 289 : * @enum {String}
  290. 290 : * @readonly
  291. 291 : */
  292. 292 : exports.PaymentScheduleTypeEnum = {
  293. 293 : /**
  294. 294 : * value: "one_time_payment"
  295. 295 : * @const
  296. 296 : */
  297. 297 : "one_time_payment": "one_time_payment" };
  298. 298 :
  299. 299 : /**
  300. 300 : * Allowed values for the <code>payment_amount_type</code> property.
  301. 301 : * @enum {String}
  302. 302 : * @readonly
  303. 303 : */
  304. 304 : exports.PaymentAmountTypeEnum = {
  305. 305 : /**
  306. 306 : * value: "current_balance"
  307. 307 : * @const
  308. 308 : */
  309. 309 : "current_balance": "current_balance",
  310. 310 : /**
  311. 311 : * value: "minimum_payment_due"
  312. 312 : * @const
  313. 313 : */
  314. 314 : "minimum_payment_due": "minimum_payment_due",
  315. 315 : /**
  316. 316 : * value: "past_payment_due"
  317. 317 : * @const
  318. 318 : */
  319. 319 : "past_payment_due": "past_payment_due",
  320. 320 : /**
  321. 321 : * value: "statement_balance"
  322. 322 : * @const
  323. 323 : */
  324. 324 : "statement_balance": "statement_balance",
  325. 325 : /**
  326. 326 : * value: "other"
  327. 327 : * @const
  328. 328 : */
  329. 329 : "other": "other" };
  330. 330 :
  331. 331 :
  332. 332 : return exports;
  333. 333 : }));
  334. 334 :
  335. 335 :