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/FeeRefundResponse', 'models/PaymentNetworkResponseVo', 'models/SourcePayment'], 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('./FeeRefundResponse'), require('./PaymentNetworkResponseVo'), require('./SourcePayment'));
  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.RefundResponse = factory(root.OrbipayPaymentsapiClient.ApiClient, root.OrbipayPaymentsapiClient.AuditInfoVo, root.OrbipayPaymentsapiClient.FeeRefundResponse, root.OrbipayPaymentsapiClient.PaymentNetworkResponseVo, root.OrbipayPaymentsapiClient.SourcePayment);
  14. 14 : }
  15. 15 : }(this, function(ApiClient, AuditInfoVo, FeeRefundResponse, PaymentNetworkResponseVo, SourcePayment) {
  16. 16 : 'use strict';
  17. 17 :
  18. 18 :
  19. 19 :
  20. 20 :
  21. 21 : /**
  22. 22 : * The RefundResponse model module.
  23. 23 : * @module models/RefundResponse
  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>RefundResponse</code>.
  30. 30 : * @alias module:models/RefundResponse
  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 : * Constructs a <code>RefundResponse</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/RefundResponse} obj Optional instance to populate.
  59. 59 : * @return {module:models/RefundResponse} The populated <code>RefundResponse</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('refund_reference')) {
  66. 66 : obj['refund_reference'] = ApiClient.convertToType(data['refund_reference'], 'String');
  67. 67 : }
  68. 68 : if (data.hasOwnProperty('id')) {
  69. 69 : obj['id'] = ApiClient.convertToType(data['id'], 'String');
  70. 70 : }
  71. 71 : if (data.hasOwnProperty('url')) {
  72. 72 : obj['url'] = ApiClient.convertToType(data['url'], 'String');
  73. 73 : }
  74. 74 : if (data.hasOwnProperty('refund_type')) {
  75. 75 : obj['refund_type'] = ApiClient.convertToType(data['refund_type'], 'String');
  76. 76 : }
  77. 77 : if (data.hasOwnProperty('refund_amount')) {
  78. 78 : obj['refund_amount'] = ApiClient.convertToType(data['refund_amount'], 'String');
  79. 79 : }
  80. 80 : if (data.hasOwnProperty('fee_refund')) {
  81. 81 : obj['fee_refund'] = FeeRefundResponse.constructFromObject(data['fee_refund']);
  82. 82 : }
  83. 83 : if (data.hasOwnProperty('status')) {
  84. 84 : obj['status'] = ApiClient.convertToType(data['status'], 'String');
  85. 85 : }
  86. 86 : if (data.hasOwnProperty('confirmation_number')) {
  87. 87 : obj['confirmation_number'] = ApiClient.convertToType(data['confirmation_number'], 'String');
  88. 88 : }
  89. 89 : if (data.hasOwnProperty('refund_date')) {
  90. 90 : obj['refund_date'] = ApiClient.convertToType(data['refund_date'], 'String');
  91. 91 : }
  92. 92 : if (data.hasOwnProperty('refund_entry_date')) {
  93. 93 : obj['refund_entry_date'] = ApiClient.convertToType(data['refund_entry_date'], 'String');
  94. 94 : }
  95. 95 : if (data.hasOwnProperty('expected_refund_settlement_date')) {
  96. 96 : obj['expected_refund_settlement_date'] = ApiClient.convertToType(data['expected_refund_settlement_date'], 'String');
  97. 97 : }
  98. 98 : if (data.hasOwnProperty('custom_fields')) {
  99. 99 : obj['custom_fields'] = ApiClient.convertToType(data['custom_fields'], {'String': 'String'});
  100. 100 : }
  101. 101 : if (data.hasOwnProperty('comments')) {
  102. 102 : obj['comments'] = ApiClient.convertToType(data['comments'], 'String');
  103. 103 : }
  104. 104 : if (data.hasOwnProperty('source_payment')) {
  105. 105 : obj['source_payment'] = SourcePayment.constructFromObject(data['source_payment']);
  106. 106 : }
  107. 107 : if (data.hasOwnProperty('payment_network_response')) {
  108. 108 : obj['payment_network_response'] = PaymentNetworkResponseVo.constructFromObject(data['payment_network_response']);
  109. 109 : }
  110. 110 : if (data.hasOwnProperty('audit_info')) {
  111. 111 : obj['audit_info'] = AuditInfoVo.constructFromObject(data['audit_info']);
  112. 112 : }
  113. 113 : }
  114. 114 : return obj;
  115. 115 : };
  116. 116 :
  117. 117 : /**
  118. 118 : * The unique identifier in the client system for the refund.
  119. 119 : * @member {String} refund_reference
  120. 120 : */
  121. 121 : exports.prototype['refund_reference'] = undefined;
  122. 122 : /**
  123. 123 : * The unique identifier assigned by EBPP to the refund.
  124. 124 : * @member {String} id
  125. 125 : */
  126. 126 : exports.prototype['id'] = undefined;
  127. 127 : /**
  128. 128 : * This URL fetches the details of refund.
  129. 129 : * @member {String} url
  130. 130 : */
  131. 131 : exports.prototype['url'] = undefined;
  132. 132 : /**
  133. 133 : * The portion of the payment amount that is to be or has been refunded. The original payment can be refunded fully including the amount and the fee components, or partially, for just the amount or the fee component. Refund can also be initiated for an arbitrary amount limited by the original payment amount.
  134. 134 : * @member {module:models/RefundResponse.RefundTypeEnum} refund_type
  135. 135 : */
  136. 136 : exports.prototype['refund_type'] = undefined;
  137. 137 : /**
  138. 138 : * The refund amount upto 2 decimal places.
  139. 139 : * @member {String} refund_amount
  140. 140 : */
  141. 141 : exports.prototype['refund_amount'] = undefined;
  142. 142 : /**
  143. 143 : * @member {module:models/FeeRefundResponse} fee_refund
  144. 144 : */
  145. 145 : exports.prototype['fee_refund'] = undefined;
  146. 146 : /**
  147. 147 : * The status of the refund.
  148. 148 : * @member {module:models/RefundResponse.StatusEnum} status
  149. 149 : */
  150. 150 : exports.prototype['status'] = undefined;
  151. 151 : /**
  152. 152 : * The confirmation number or reference provided to the customer for the refund.
  153. 153 : * @member {String} confirmation_number
  154. 154 : */
  155. 155 : exports.prototype['confirmation_number'] = undefined;
  156. 156 : /**
  157. 157 : * The date on which the refund is scheduled to be made. It must be in ISO8601 full-date format, namely, YYYY-MM-DD.
  158. 158 : * @member {String} refund_date
  159. 159 : */
  160. 160 : exports.prototype['refund_date'] = undefined;
  161. 161 : /**
  162. 162 : * The date on which the refund captured in EBPP. It must be in ISO8601 full-date format, namely, YYYY-MM-DD.
  163. 163 : * @member {String} refund_entry_date
  164. 164 : */
  165. 165 : exports.prototype['refund_entry_date'] = undefined;
  166. 166 : /**
  167. 167 : * The date by which the credits would be posted to the original funding account. ISO8601 full-date format, YYYY-MM-DD
  168. 168 : * @member {String} expected_refund_settlement_date
  169. 169 : */
  170. 170 : exports.prototype['expected_refund_settlement_date'] = 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.
  173. 173 : * @member {Object.<String, String>} custom_fields
  174. 174 : */
  175. 175 : exports.prototype['custom_fields'] = undefined;
  176. 176 : /**
  177. 177 : * 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.
  178. 178 : * @member {String} comments
  179. 179 : */
  180. 180 : exports.prototype['comments'] = undefined;
  181. 181 : /**
  182. 182 : * @member {module:models/SourcePayment} source_payment
  183. 183 : */
  184. 184 : exports.prototype['source_payment'] = undefined;
  185. 185 : /**
  186. 186 : * @member {module:models/PaymentNetworkResponseVo} payment_network_response
  187. 187 : */
  188. 188 : exports.prototype['payment_network_response'] = undefined;
  189. 189 : /**
  190. 190 : * @member {module:models/AuditInfoVo} audit_info
  191. 191 : */
  192. 192 : exports.prototype['audit_info'] = undefined;
  193. 193 :
  194. 194 :
  195. 195 : /**
  196. 196 : * Allowed values for the <code>refund_type</code> property.
  197. 197 : * @enum {String}
  198. 198 : * @readonly
  199. 199 : */
  200. 200 : exports.RefundTypeEnum = {
  201. 201 : /**
  202. 202 : * value: "payment_and_fee"
  203. 203 : * @const
  204. 204 : */
  205. 205 : "payment_and_fee": "payment_and_fee",
  206. 206 : /**
  207. 207 : * value: "payment_only"
  208. 208 : * @const
  209. 209 : */
  210. 210 : "payment_only": "payment_only",
  211. 211 : /**
  212. 212 : * value: "fee_only"
  213. 213 : * @const
  214. 214 : */
  215. 215 : "fee_only": "fee_only",
  216. 216 : /**
  217. 217 : * value: "other"
  218. 218 : * @const
  219. 219 : */
  220. 220 : "other": "other" };
  221. 221 :
  222. 222 : /**
  223. 223 : * Allowed values for the <code>status</code> property.
  224. 224 : * @enum {String}
  225. 225 : * @readonly
  226. 226 : */
  227. 227 : exports.StatusEnum = {
  228. 228 : /**
  229. 229 : * value: "scheduled"
  230. 230 : * @const
  231. 231 : */
  232. 232 : "scheduled": "scheduled",
  233. 233 : /**
  234. 234 : * value: "cancelled"
  235. 235 : * @const
  236. 236 : */
  237. 237 : "cancelled": "cancelled",
  238. 238 : /**
  239. 239 : * value: "processing"
  240. 240 : * @const
  241. 241 : */
  242. 242 : "processing": "processing",
  243. 243 : /**
  244. 244 : * value: "processed"
  245. 245 : * @const
  246. 246 : */
  247. 247 : "processed": "processed",
  248. 248 : /**
  249. 249 : * value: "declined"
  250. 250 : * @const
  251. 251 : */
  252. 252 : "declined": "declined",
  253. 253 : /**
  254. 254 : * value: "returned"
  255. 255 : * @const
  256. 256 : */
  257. 257 : "returned": "returned",
  258. 258 : /**
  259. 259 : * value: "disputed"
  260. 260 : * @const
  261. 261 : */
  262. 262 : "disputed": "disputed",
  263. 263 : /**
  264. 264 : * value: "error"
  265. 265 : * @const
  266. 266 : */
  267. 267 : "error": "error" };
  268. 268 :
  269. 269 :
  270. 270 : return exports;
  271. 271 : }));
  272. 272 :
  273. 273 :