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/CustomerAccountMinimalRequest', 'models/CustomerMinimalRequest', 'models/FeeRequest', 'models/FundingAccountMinimalRequest', '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('./CustomerAccountMinimalRequest'), require('./CustomerMinimalRequest'), require('./FeeRequest'), require('./FundingAccountMinimalRequest'), 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.CreatePaymentSetupRequest = factory(root.OrbipayPaymentsapiClient.ApiClient, root.OrbipayPaymentsapiClient.CustomerAccountMinimalRequest, root.OrbipayPaymentsapiClient.CustomerMinimalRequest, root.OrbipayPaymentsapiClient.FeeRequest, root.OrbipayPaymentsapiClient.FundingAccountMinimalRequest, root.OrbipayPaymentsapiClient.PaymentScheduleVo);
  14. 14 : }
  15. 15 : }(this, function(ApiClient, CustomerAccountMinimalRequest, CustomerMinimalRequest, FeeRequest, FundingAccountMinimalRequest, PaymentScheduleVo) {
  16. 16 : 'use strict';
  17. 17 :
  18. 18 :
  19. 19 :
  20. 20 :
  21. 21 : /**
  22. 22 : * The CreatePaymentSetupRequest model module.
  23. 23 : * @module models/CreatePaymentSetupRequest
  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>CreatePaymentSetupRequest</code>.
  30. 30 : * @alias module:models/CreatePaymentSetupRequest
  31. 31 : * @class
  32. 32 : * @param payment_setup_schedule_type {module:models/CreatePaymentSetupRequest.PaymentSetupScheduleTypeEnum} The schedule type for the payment setup.
  33. 33 : * @param customer {module:models/CustomerMinimalRequest}
  34. 34 : * @param funding_account {module:models/FundingAccountMinimalRequest}
  35. 35 : * @param customer_account {module:models/CustomerAccountMinimalRequest}
  36. 36 : * @param payment_schedule {module:models/PaymentScheduleVo}
  37. 37 : */
  38. 38 : var exports = function(payment_setup_schedule_type, customer, funding_account, customer_account, payment_schedule) {
  39. 39 : var _this = this;
  40. 40 :
  41. 41 :
  42. 42 : _this['payment_setup_schedule_type'] = payment_setup_schedule_type;
  43. 43 :
  44. 44 :
  45. 45 :
  46. 46 : _this['customer'] = customer;
  47. 47 : _this['funding_account'] = funding_account;
  48. 48 : _this['customer_account'] = customer_account;
  49. 49 : _this['payment_schedule'] = payment_schedule;
  50. 50 :
  51. 51 :
  52. 52 : };
  53. 53 :
  54. 54 : /**
  55. 55 : * Constructs a <code>CreatePaymentSetupRequest</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/CreatePaymentSetupRequest} obj Optional instance to populate.
  59. 59 : * @return {module:models/CreatePaymentSetupRequest} The populated <code>CreatePaymentSetupRequest</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('payment_setup_reference')) {
  66. 66 : obj['payment_setup_reference'] = ApiClient.convertToType(data['payment_setup_reference'], 'String');
  67. 67 : }
  68. 68 : if (data.hasOwnProperty('payment_setup_schedule_type')) {
  69. 69 : obj['payment_setup_schedule_type'] = ApiClient.convertToType(data['payment_setup_schedule_type'], 'String');
  70. 70 : }
  71. 71 : if (data.hasOwnProperty('amount')) {
  72. 72 : obj['amount'] = ApiClient.convertToType(data['amount'], 'String');
  73. 73 : }
  74. 74 : if (data.hasOwnProperty('card_cvv_number')) {
  75. 75 : obj['card_cvv_number'] = ApiClient.convertToType(data['card_cvv_number'], 'String');
  76. 76 : }
  77. 77 : if (data.hasOwnProperty('fee')) {
  78. 78 : obj['fee'] = FeeRequest.constructFromObject(data['fee']);
  79. 79 : }
  80. 80 : if (data.hasOwnProperty('customer')) {
  81. 81 : obj['customer'] = CustomerMinimalRequest.constructFromObject(data['customer']);
  82. 82 : }
  83. 83 : if (data.hasOwnProperty('funding_account')) {
  84. 84 : obj['funding_account'] = FundingAccountMinimalRequest.constructFromObject(data['funding_account']);
  85. 85 : }
  86. 86 : if (data.hasOwnProperty('customer_account')) {
  87. 87 : obj['customer_account'] = CustomerAccountMinimalRequest.constructFromObject(data['customer_account']);
  88. 88 : }
  89. 89 : if (data.hasOwnProperty('payment_schedule')) {
  90. 90 : obj['payment_schedule'] = PaymentScheduleVo.constructFromObject(data['payment_schedule']);
  91. 91 : }
  92. 92 : if (data.hasOwnProperty('custom_fields')) {
  93. 93 : obj['custom_fields'] = ApiClient.convertToType(data['custom_fields'], {'String': 'String'});
  94. 94 : }
  95. 95 : if (data.hasOwnProperty('comments')) {
  96. 96 : obj['comments'] = ApiClient.convertToType(data['comments'], 'String');
  97. 97 : }
  98. 98 : }
  99. 99 : return obj;
  100. 100 : };
  101. 101 :
  102. 102 : /**
  103. 103 : * The unique identifier in the client system for the paymentSetup.
  104. 104 : * @member {String} payment_setup_reference
  105. 105 : */
  106. 106 : exports.prototype['payment_setup_reference'] = undefined;
  107. 107 : /**
  108. 108 : * The schedule type for the payment setup.
  109. 109 : * @member {module:models/CreatePaymentSetupRequest.PaymentSetupScheduleTypeEnum} payment_setup_schedule_type
  110. 110 : */
  111. 111 : exports.prototype['payment_setup_schedule_type'] = undefined;
  112. 112 : /**
  113. 113 : * 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.
  114. 114 : * @member {String} amount
  115. 115 : */
  116. 116 : exports.prototype['amount'] = undefined;
  117. 117 : /**
  118. 118 : * This is never returned by EBPP. This needs to be passed to EBPP when making or editing a payment with a card funding account.
  119. 119 : * @member {String} card_cvv_number
  120. 120 : */
  121. 121 : exports.prototype['card_cvv_number'] = undefined;
  122. 122 : /**
  123. 123 : * @member {module:models/FeeRequest} fee
  124. 124 : */
  125. 125 : exports.prototype['fee'] = undefined;
  126. 126 : /**
  127. 127 : * @member {module:models/CustomerMinimalRequest} customer
  128. 128 : */
  129. 129 : exports.prototype['customer'] = undefined;
  130. 130 : /**
  131. 131 : * @member {module:models/FundingAccountMinimalRequest} funding_account
  132. 132 : */
  133. 133 : exports.prototype['funding_account'] = undefined;
  134. 134 : /**
  135. 135 : * @member {module:models/CustomerAccountMinimalRequest} customer_account
  136. 136 : */
  137. 137 : exports.prototype['customer_account'] = undefined;
  138. 138 : /**
  139. 139 : * @member {module:models/PaymentScheduleVo} payment_schedule
  140. 140 : */
  141. 141 : exports.prototype['payment_schedule'] = undefined;
  142. 142 : /**
  143. 143 : * 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.
  144. 144 : * @member {Object.<String, String>} custom_fields
  145. 145 : */
  146. 146 : exports.prototype['custom_fields'] = undefined;
  147. 147 : /**
  148. 148 : * 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.
  149. 149 : * @member {String} comments
  150. 150 : */
  151. 151 : exports.prototype['comments'] = undefined;
  152. 152 :
  153. 153 :
  154. 154 : /**
  155. 155 : * Allowed values for the <code>payment_setup_schedule_type</code> property.
  156. 156 : * @enum {String}
  157. 157 : * @readonly
  158. 158 : */
  159. 159 : exports.PaymentSetupScheduleTypeEnum = {
  160. 160 : /**
  161. 161 : * value: "variable_recurring_enrollment"
  162. 162 : * @const
  163. 163 : */
  164. 164 : "variable_recurring_enrollment": "variable_recurring_enrollment",
  165. 165 : /**
  166. 166 : * value: "autopay_enrollment"
  167. 167 : * @const
  168. 168 : */
  169. 169 : "autopay_enrollment": "autopay_enrollment",
  170. 170 : /**
  171. 171 : * value: "payment_plan"
  172. 172 : * @const
  173. 173 : */
  174. 174 : "payment_plan": "payment_plan" };
  175. 175 :
  176. 176 :
  177. 177 : return exports;
  178. 178 : }));
  179. 179 :
  180. 180 :