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