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 : * Constructs a <code>SimplePaymentRequest</code> from a plain JavaScript object, optionally creating a new instance.
  57. 57 : * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
  58. 58 : * @param {Object} data The plain JavaScript object bearing properties of interest.
  59. 59 : * @param {module:models/SimplePaymentRequest} obj Optional instance to populate.
  60. 60 : * @return {module:models/SimplePaymentRequest} The populated <code>SimplePaymentRequest</code> instance.
  61. 61 : */
  62. 62 : exports.constructFromObject = function(data, obj) {
  63. 63 : if (data) {
  64. 64 : obj = obj || new exports();
  65. 65 :
  66. 66 : if (data.hasOwnProperty('amount')) {
  67. 67 : obj['amount'] = ApiClient.convertToType(data['amount'], 'String');
  68. 68 : }
  69. 69 : if (data.hasOwnProperty('card_cvv_number')) {
  70. 70 : obj['card_cvv_number'] = ApiClient.convertToType(data['card_cvv_number'], 'String');
  71. 71 : }
  72. 72 : if (data.hasOwnProperty('payment_date')) {
  73. 73 : obj['payment_date'] = ApiClient.convertToType(data['payment_date'], 'String');
  74. 74 : }
  75. 75 : if (data.hasOwnProperty('payment_request_date')) {
  76. 76 : obj['payment_request_date'] = ApiClient.convertToType(data['payment_request_date'], 'String');
  77. 77 : }
  78. 78 : if (data.hasOwnProperty('payment_amount_type')) {
  79. 79 : obj['payment_amount_type'] = ApiClient.convertToType(data['payment_amount_type'], 'String');
  80. 80 : }
  81. 81 : if (data.hasOwnProperty('fee')) {
  82. 82 : obj['fee'] = FeeRequest.constructFromObject(data['fee']);
  83. 83 : }
  84. 84 : if (data.hasOwnProperty('customer')) {
  85. 85 : obj['customer'] = SimplePaymentCustomerRequest.constructFromObject(data['customer']);
  86. 86 : }
  87. 87 : if (data.hasOwnProperty('funding_account')) {
  88. 88 : obj['funding_account'] = SimplePaymentFundingAccountRequest.constructFromObject(data['funding_account']);
  89. 89 : }
  90. 90 : if (data.hasOwnProperty('customer_account')) {
  91. 91 : obj['customer_account'] = CreateCustomerAccountRequest.constructFromObject(data['customer_account']);
  92. 92 : }
  93. 93 : if (data.hasOwnProperty('payment_reference')) {
  94. 94 : obj['payment_reference'] = ApiClient.convertToType(data['payment_reference'], 'String');
  95. 95 : }
  96. 96 : if (data.hasOwnProperty('payment_notification_email')) {
  97. 97 : obj['payment_notification_email'] = ApiClient.convertToType(data['payment_notification_email'], 'String');
  98. 98 : }
  99. 99 : if (data.hasOwnProperty('comments')) {
  100. 100 : obj['comments'] = ApiClient.convertToType(data['comments'], 'String');
  101. 101 : }
  102. 102 : if (data.hasOwnProperty('custom_fields')) {
  103. 103 : obj['custom_fields'] = ApiClient.convertToType(data['custom_fields'], {'String': 'String'});
  104. 104 : }
  105. 105 : }
  106. 106 : return obj;
  107. 107 : };
  108. 108 :
  109. 109 : /**
  110. 110 : * 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.
  111. 111 : * @member {String} amount
  112. 112 : */
  113. 113 : exports.prototype['amount'] = undefined;
  114. 114 : /**
  115. 115 : * This is never returned by EBPP. This needs to be passed to EBPP when making or editing a payment with a card funding account.
  116. 116 : * @member {String} card_cvv_number
  117. 117 : */
  118. 118 : exports.prototype['card_cvv_number'] = undefined;
  119. 119 : /**
  120. 120 : * The date on which the payment is scheduled to be made. It must be in ISO8601 full-date format, namely, YYYY-MM-DD.
  121. 121 : * @member {String} payment_date
  122. 122 : */
  123. 123 : exports.prototype['payment_date'] = undefined;
  124. 124 : /**
  125. 125 : * 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.
  126. 126 : * @member {String} payment_request_date
  127. 127 : */
  128. 128 : exports.prototype['payment_request_date'] = undefined;
  129. 129 : /**
  130. 130 : * 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.
  131. 131 : * @member {module:models/SimplePaymentRequest.PaymentAmountTypeEnum} payment_amount_type
  132. 132 : */
  133. 133 : exports.prototype['payment_amount_type'] = undefined;
  134. 134 : /**
  135. 135 : * @member {module:models/FeeRequest} fee
  136. 136 : */
  137. 137 : exports.prototype['fee'] = undefined;
  138. 138 : /**
  139. 139 : * @member {module:models/SimplePaymentCustomerRequest} customer
  140. 140 : */
  141. 141 : exports.prototype['customer'] = undefined;
  142. 142 : /**
  143. 143 : * @member {module:models/SimplePaymentFundingAccountRequest} funding_account
  144. 144 : */
  145. 145 : exports.prototype['funding_account'] = undefined;
  146. 146 : /**
  147. 147 : * @member {module:models/CreateCustomerAccountRequest} customer_account
  148. 148 : */
  149. 149 : exports.prototype['customer_account'] = undefined;
  150. 150 : /**
  151. 151 : * The unique identifier in the client system for the payment.
  152. 152 : * @member {String} payment_reference
  153. 153 : */
  154. 154 : exports.prototype['payment_reference'] = undefined;
  155. 155 : /**
  156. 156 : * The email address of the customer to which payment notifications from EBPP will be sent. The notifications will be sent to customer email in case if this field is not present.
  157. 157 : * @member {String} payment_notification_email
  158. 158 : */
  159. 159 : exports.prototype['payment_notification_email'] = undefined;
  160. 160 : /**
  161. 161 : * 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.
  162. 162 : * @member {String} comments
  163. 163 : */
  164. 164 : exports.prototype['comments'] = undefined;
  165. 165 : /**
  166. 166 : * 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.
  167. 167 : * @member {Object.<String, String>} custom_fields
  168. 168 : */
  169. 169 : exports.prototype['custom_fields'] = undefined;
  170. 170 :
  171. 171 :
  172. 172 : /**
  173. 173 : * Allowed values for the <code>payment_amount_type</code> property.
  174. 174 : * @enum {String}
  175. 175 : * @readonly
  176. 176 : */
  177. 177 : exports.PaymentAmountTypeEnum = {
  178. 178 : /**
  179. 179 : * value: "current_balance"
  180. 180 : * @const
  181. 181 : */
  182. 182 : "current_balance": "current_balance",
  183. 183 : /**
  184. 184 : * value: "minimum_payment_due"
  185. 185 : * @const
  186. 186 : */
  187. 187 : "minimum_payment_due": "minimum_payment_due",
  188. 188 : /**
  189. 189 : * value: "past_payment_due"
  190. 190 : * @const
  191. 191 : */
  192. 192 : "past_payment_due": "past_payment_due",
  193. 193 : /**
  194. 194 : * value: "statement_balance"
  195. 195 : * @const
  196. 196 : */
  197. 197 : "statement_balance": "statement_balance",
  198. 198 : /**
  199. 199 : * value: "discounted_amount"
  200. 200 : * @const
  201. 201 : */
  202. 202 : "discounted_amount": "discounted_amount",
  203. 203 : /**
  204. 204 : * value: "penalty_amount"
  205. 205 : * @const
  206. 206 : */
  207. 207 : "penalty_amount": "penalty_amount",
  208. 208 : /**
  209. 209 : * value: "other"
  210. 210 : * @const
  211. 211 : */
  212. 212 : "other": "other" };
  213. 213 :
  214. 214 :
  215. 215 : return exports;
  216. 216 : }));
  217. 217 :
  218. 218 :