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/FeeRequest', 'models/SimplePaymentCustomerAccountRequest', 'models/SimplePaymentCustomerRequest', 'models/SimplePaymentFundingAccountRequest'], 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('./FeeRequest'), require('./SimplePaymentCustomerAccountRequest'), require('./SimplePaymentCustomerRequest'), require('./SimplePaymentFundingAccountRequest'));
  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.SimplePaymentRequest = factory(root.OrbipayPaymentsapiClient.ApiClient, root.OrbipayPaymentsapiClient.FeeRequest, root.OrbipayPaymentsapiClient.SimplePaymentCustomerAccountRequest, root.OrbipayPaymentsapiClient.SimplePaymentCustomerRequest, root.OrbipayPaymentsapiClient.SimplePaymentFundingAccountRequest);
  14. 14 : }
  15. 15 : }(this, function(ApiClient, FeeRequest, SimplePaymentCustomerAccountRequest, SimplePaymentCustomerRequest, SimplePaymentFundingAccountRequest) {
  16. 16 : 'use strict';
  17. 17 :
  18. 18 :
  19. 19 :
  20. 20 :
  21. 21 : /**
  22. 22 : * The SimplePaymentRequest model module.
  23. 23 : * @module models/SimplePaymentRequest
  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>SimplePaymentRequest</code>.
  30. 30 : * @alias module:models/SimplePaymentRequest
  31. 31 : * @class
  32. 32 : * @param payment_amount_type {module:models/SimplePaymentRequest.PaymentAmountTypeEnum} 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.
  33. 33 : * @param customer {module:models/SimplePaymentCustomerRequest}
  34. 34 : * @param funding_account {module:models/SimplePaymentFundingAccountRequest}
  35. 35 : * @param customer_account {module:models/SimplePaymentCustomerAccountRequest}
  36. 36 : */
  37. 37 : var exports = function(payment_amount_type, customer, funding_account, customer_account) {
  38. 38 : var _this = this;
  39. 39 :
  40. 40 :
  41. 41 :
  42. 42 :
  43. 43 :
  44. 44 : _this['payment_amount_type'] = payment_amount_type;
  45. 45 :
  46. 46 : _this['customer'] = customer;
  47. 47 : _this['funding_account'] = funding_account;
  48. 48 : _this['customer_account'] = customer_account;
  49. 49 :
  50. 50 :
  51. 51 :
  52. 52 :
  53. 53 :
  54. 54 :
  55. 55 : };
  56. 56 :
  57. 57 : /**
  58. 58 : * Constructs a <code>SimplePaymentRequest</code> from a plain JavaScript object, optionally creating a new instance.
  59. 59 : * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
  60. 60 : * @param {Object} data The plain JavaScript object bearing properties of interest.
  61. 61 : * @param {module:models/SimplePaymentRequest} obj Optional instance to populate.
  62. 62 : * @return {module:models/SimplePaymentRequest} The populated <code>SimplePaymentRequest</code> instance.
  63. 63 : */
  64. 64 : exports.constructFromObject = function(data, obj) {
  65. 65 : if (data) {
  66. 66 : obj = obj || new exports();
  67. 67 :
  68. 68 : if (data.hasOwnProperty('amount')) {
  69. 69 : obj['amount'] = ApiClient.convertToType(data['amount'], 'String');
  70. 70 : }
  71. 71 : if (data.hasOwnProperty('card_cvv_number')) {
  72. 72 : obj['card_cvv_number'] = ApiClient.convertToType(data['card_cvv_number'], 'String');
  73. 73 : }
  74. 74 : if (data.hasOwnProperty('payment_date')) {
  75. 75 : obj['payment_date'] = ApiClient.convertToType(data['payment_date'], 'String');
  76. 76 : }
  77. 77 : if (data.hasOwnProperty('payment_request_date')) {
  78. 78 : obj['payment_request_date'] = ApiClient.convertToType(data['payment_request_date'], 'String');
  79. 79 : }
  80. 80 : if (data.hasOwnProperty('payment_amount_type')) {
  81. 81 : obj['payment_amount_type'] = ApiClient.convertToType(data['payment_amount_type'], 'String');
  82. 82 : }
  83. 83 : if (data.hasOwnProperty('fee')) {
  84. 84 : obj['fee'] = FeeRequest.constructFromObject(data['fee']);
  85. 85 : }
  86. 86 : if (data.hasOwnProperty('customer')) {
  87. 87 : obj['customer'] = SimplePaymentCustomerRequest.constructFromObject(data['customer']);
  88. 88 : }
  89. 89 : if (data.hasOwnProperty('funding_account')) {
  90. 90 : obj['funding_account'] = SimplePaymentFundingAccountRequest.constructFromObject(data['funding_account']);
  91. 91 : }
  92. 92 : if (data.hasOwnProperty('customer_account')) {
  93. 93 : obj['customer_account'] = SimplePaymentCustomerAccountRequest.constructFromObject(data['customer_account']);
  94. 94 : }
  95. 95 : if (data.hasOwnProperty('payment_reference')) {
  96. 96 : obj['payment_reference'] = ApiClient.convertToType(data['payment_reference'], 'String');
  97. 97 : }
  98. 98 : if (data.hasOwnProperty('payment_notification_email')) {
  99. 99 : obj['payment_notification_email'] = ApiClient.convertToType(data['payment_notification_email'], 'String');
  100. 100 : }
  101. 101 : if (data.hasOwnProperty('cryptogram')) {
  102. 102 : obj['cryptogram'] = ApiClient.convertToType(data['cryptogram'], 'String');
  103. 103 : }
  104. 104 : if (data.hasOwnProperty('eci')) {
  105. 105 : obj['eci'] = ApiClient.convertToType(data['eci'], 'String');
  106. 106 : }
  107. 107 : if (data.hasOwnProperty('comments')) {
  108. 108 : obj['comments'] = ApiClient.convertToType(data['comments'], 'String');
  109. 109 : }
  110. 110 : if (data.hasOwnProperty('custom_fields')) {
  111. 111 : obj['custom_fields'] = ApiClient.convertToType(data['custom_fields'], {'String': 'String'});
  112. 112 : }
  113. 113 : }
  114. 114 : return obj;
  115. 115 : };
  116. 116 :
  117. 117 : /**
  118. 118 : * The amount being paid.
  119. 119 : * @member {String} amount
  120. 120 : */
  121. 121 : exports.prototype['amount'] = undefined;
  122. 122 : /**
  123. 123 : * @member {String} card_cvv_number
  124. 124 : */
  125. 125 : exports.prototype['card_cvv_number'] = undefined;
  126. 126 : /**
  127. 127 : * The date on which the payment is scheduled to be made. It must be in ISO8601 full-date format, namely, YYYY-MM-DD.
  128. 128 : * @member {String} payment_date
  129. 129 : */
  130. 130 : exports.prototype['payment_date'] = undefined;
  131. 131 : /**
  132. 132 : * The date on which the biller wants the payment to be settled. It must be in ISO8601 full-date format, namely, YYYY-MM-DD.
  133. 133 : * @member {String} payment_request_date
  134. 134 : */
  135. 135 : exports.prototype['payment_request_date'] = undefined;
  136. 136 : /**
  137. 137 : * 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.
  138. 138 : * @member {module:models/SimplePaymentRequest.PaymentAmountTypeEnum} payment_amount_type
  139. 139 : */
  140. 140 : exports.prototype['payment_amount_type'] = undefined;
  141. 141 : /**
  142. 142 : * @member {module:models/FeeRequest} fee
  143. 143 : */
  144. 144 : exports.prototype['fee'] = undefined;
  145. 145 : /**
  146. 146 : * @member {module:models/SimplePaymentCustomerRequest} customer
  147. 147 : */
  148. 148 : exports.prototype['customer'] = undefined;
  149. 149 : /**
  150. 150 : * @member {module:models/SimplePaymentFundingAccountRequest} funding_account
  151. 151 : */
  152. 152 : exports.prototype['funding_account'] = undefined;
  153. 153 : /**
  154. 154 : * @member {module:models/SimplePaymentCustomerAccountRequest} customer_account
  155. 155 : */
  156. 156 : exports.prototype['customer_account'] = undefined;
  157. 157 : /**
  158. 158 : * The unique identifier in the client system for the payment.
  159. 159 : * @member {String} payment_reference
  160. 160 : */
  161. 161 : exports.prototype['payment_reference'] = undefined;
  162. 162 : /**
  163. 163 : * The email address to which notifications for the payment will be sent.
  164. 164 : * @member {String} payment_notification_email
  165. 165 : */
  166. 166 : exports.prototype['payment_notification_email'] = undefined;
  167. 167 : /**
  168. 168 : * Online Payment Cryptogram, as defined by 3-D secure.
  169. 169 : * @member {String} cryptogram
  170. 170 : */
  171. 171 : exports.prototype['cryptogram'] = undefined;
  172. 172 : /**
  173. 173 : * ECI Indicator, as defined by 3-D secure. The card network may add an ECI indicator to the card data.
  174. 174 : * @member {String} eci
  175. 175 : */
  176. 176 : exports.prototype['eci'] = undefined;
  177. 177 : /**
  178. 178 : * Comments that can be used to recollect the operation performed on the resource object.
  179. 179 : * @member {String} comments
  180. 180 : */
  181. 181 : exports.prototype['comments'] = undefined;
  182. 182 : /**
  183. 183 : * The additional information or meta-information that EBPP can accept, maintain and transmit back to the client.
  184. 184 : * @member {Object.<String, String>} custom_fields
  185. 185 : */
  186. 186 : exports.prototype['custom_fields'] = undefined;
  187. 187 :
  188. 188 :
  189. 189 : /**
  190. 190 : * Allowed values for the <code>payment_amount_type</code> property.
  191. 191 : * @enum {String}
  192. 192 : * @readonly
  193. 193 : */
  194. 194 : exports.PaymentAmountTypeEnum = {
  195. 195 : /**
  196. 196 : * value: "current_balance"
  197. 197 : * @const
  198. 198 : */
  199. 199 : "current_balance": "current_balance",
  200. 200 : /**
  201. 201 : * value: "minimum_payment_due"
  202. 202 : * @const
  203. 203 : */
  204. 204 : "minimum_payment_due": "minimum_payment_due",
  205. 205 : /**
  206. 206 : * value: "past_payment_due"
  207. 207 : * @const
  208. 208 : */
  209. 209 : "past_payment_due": "past_payment_due",
  210. 210 : /**
  211. 211 : * value: "statement_balance"
  212. 212 : * @const
  213. 213 : */
  214. 214 : "statement_balance": "statement_balance",
  215. 215 : /**
  216. 216 : * value: "discounted_amount"
  217. 217 : * @const
  218. 218 : */
  219. 219 : "discounted_amount": "discounted_amount",
  220. 220 : /**
  221. 221 : * value: "penalty_amount"
  222. 222 : * @const
  223. 223 : */
  224. 224 : "penalty_amount": "penalty_amount",
  225. 225 : /**
  226. 226 : * value: "other"
  227. 227 : * @const
  228. 228 : */
  229. 229 : "other": "other" };
  230. 230 :
  231. 231 :
  232. 232 : return exports;
  233. 233 : }));
  234. 234 :
  235. 235 :