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/CreateCustomerAccountRequest', 'models/FeeRequest', '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('./CreateCustomerAccountRequest'), require('./FeeRequest'), 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.CreateCustomerAccountRequest, root.OrbipayPaymentsapiClient.FeeRequest, root.OrbipayPaymentsapiClient.SimplePaymentCustomerRequest, root.OrbipayPaymentsapiClient.SimplePaymentFundingAccountRequest);
  14. 14 : }
  15. 15 : }(this, function(ApiClient, CreateCustomerAccountRequest, FeeRequest, 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/CreateCustomerAccountRequest}
  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'] = CreateCustomerAccountRequest.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. 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.
  119. 119 : * @member {String} amount
  120. 120 : */
  121. 121 : exports.prototype['amount'] = undefined;
  122. 122 : /**
  123. 123 : * This is never returned by EBPP. This needs to be passed to EBPP when making or editing a payment with a card funding account.
  124. 124 : * @member {String} card_cvv_number
  125. 125 : */
  126. 126 : exports.prototype['card_cvv_number'] = undefined;
  127. 127 : /**
  128. 128 : * The date on which the payment is scheduled to be made. It must be in ISO8601 full-date format, namely, YYYY-MM-DD.
  129. 129 : * @member {String} payment_date
  130. 130 : */
  131. 131 : exports.prototype['payment_date'] = undefined;
  132. 132 : /**
  133. 133 : * 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.
  134. 134 : * @member {String} payment_request_date
  135. 135 : */
  136. 136 : exports.prototype['payment_request_date'] = undefined;
  137. 137 : /**
  138. 138 : * 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.
  139. 139 : * @member {module:models/SimplePaymentRequest.PaymentAmountTypeEnum} payment_amount_type
  140. 140 : */
  141. 141 : exports.prototype['payment_amount_type'] = undefined;
  142. 142 : /**
  143. 143 : * @member {module:models/FeeRequest} fee
  144. 144 : */
  145. 145 : exports.prototype['fee'] = undefined;
  146. 146 : /**
  147. 147 : * @member {module:models/SimplePaymentCustomerRequest} customer
  148. 148 : */
  149. 149 : exports.prototype['customer'] = undefined;
  150. 150 : /**
  151. 151 : * @member {module:models/SimplePaymentFundingAccountRequest} funding_account
  152. 152 : */
  153. 153 : exports.prototype['funding_account'] = undefined;
  154. 154 : /**
  155. 155 : * @member {module:models/CreateCustomerAccountRequest} customer_account
  156. 156 : */
  157. 157 : exports.prototype['customer_account'] = undefined;
  158. 158 : /**
  159. 159 : * The unique identifier in the client system for the payment.
  160. 160 : * @member {String} payment_reference
  161. 161 : */
  162. 162 : exports.prototype['payment_reference'] = undefined;
  163. 163 : /**
  164. 164 : * The email address to which notifications for the payment will be sent. The notifications will be sent to the customer's email in case this is not provided.
  165. 165 : * @member {String} payment_notification_email
  166. 166 : */
  167. 167 : exports.prototype['payment_notification_email'] = undefined;
  168. 168 : /**
  169. 169 : * This is applicable only for Apple Pay transactions. Online Payment Cryptogram, as defined by 3-D secure.
  170. 170 : * @member {String} cryptogram
  171. 171 : */
  172. 172 : exports.prototype['cryptogram'] = undefined;
  173. 173 : /**
  174. 174 : * This is applicable only for Apple Pay transactions. ECI Indicator, as defined by 3-D secure. The card network may add an ECI indicator to the card data. This indicator is then included in the payment token. if you receive an ECI indicator, you must pass it on to your payment processor, otherwise, the transaction fails.
  175. 175 : * @member {String} eci
  176. 176 : */
  177. 177 : exports.prototype['eci'] = undefined;
  178. 178 : /**
  179. 179 : * 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.
  180. 180 : * @member {String} comments
  181. 181 : */
  182. 182 : exports.prototype['comments'] = undefined;
  183. 183 : /**
  184. 184 : * 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.
  185. 185 : * @member {Object.<String, String>} custom_fields
  186. 186 : */
  187. 187 : exports.prototype['custom_fields'] = undefined;
  188. 188 :
  189. 189 :
  190. 190 : /**
  191. 191 : * Allowed values for the <code>payment_amount_type</code> property.
  192. 192 : * @enum {String}
  193. 193 : * @readonly
  194. 194 : */
  195. 195 : exports.PaymentAmountTypeEnum = {
  196. 196 : /**
  197. 197 : * value: "current_balance"
  198. 198 : * @const
  199. 199 : */
  200. 200 : "current_balance": "current_balance",
  201. 201 : /**
  202. 202 : * value: "minimum_payment_due"
  203. 203 : * @const
  204. 204 : */
  205. 205 : "minimum_payment_due": "minimum_payment_due",
  206. 206 : /**
  207. 207 : * value: "past_payment_due"
  208. 208 : * @const
  209. 209 : */
  210. 210 : "past_payment_due": "past_payment_due",
  211. 211 : /**
  212. 212 : * value: "statement_balance"
  213. 213 : * @const
  214. 214 : */
  215. 215 : "statement_balance": "statement_balance",
  216. 216 : /**
  217. 217 : * value: "discounted_amount"
  218. 218 : * @const
  219. 219 : */
  220. 220 : "discounted_amount": "discounted_amount",
  221. 221 : /**
  222. 222 : * value: "penalty_amount"
  223. 223 : * @const
  224. 224 : */
  225. 225 : "penalty_amount": "penalty_amount",
  226. 226 : /**
  227. 227 : * value: "other"
  228. 228 : * @const
  229. 229 : */
  230. 230 : "other": "other" };
  231. 231 :
  232. 232 :
  233. 233 : return exports;
  234. 234 : }));
  235. 235 :
  236. 236 :