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/FundingAccountMinimalRequest', 'models/PaymentScheduleVo', 'models/PaymentSetupFeeRequest'], 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('./FundingAccountMinimalRequest'), require('./PaymentScheduleVo'), require('./PaymentSetupFeeRequest'));
  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.FundingAccountMinimalRequest, root.OrbipayPaymentsapiClient.PaymentScheduleVo, root.OrbipayPaymentsapiClient.PaymentSetupFeeRequest);
  14. 14 : }
  15. 15 : }(this, function(ApiClient, CustomerAccountMinimalRequest, CustomerMinimalRequest, FundingAccountMinimalRequest, PaymentScheduleVo, PaymentSetupFeeRequest) {
  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'] = PaymentSetupFeeRequest.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.
  114. 114 : * @member {String} amount
  115. 115 : */
  116. 116 : exports.prototype['amount'] = undefined;
  117. 117 : /**
  118. 118 : * @member {String} card_cvv_number
  119. 119 : */
  120. 120 : exports.prototype['card_cvv_number'] = undefined;
  121. 121 : /**
  122. 122 : * @member {module:models/PaymentSetupFeeRequest} fee
  123. 123 : */
  124. 124 : exports.prototype['fee'] = undefined;
  125. 125 : /**
  126. 126 : * @member {module:models/CustomerMinimalRequest} customer
  127. 127 : */
  128. 128 : exports.prototype['customer'] = undefined;
  129. 129 : /**
  130. 130 : * @member {module:models/FundingAccountMinimalRequest} funding_account
  131. 131 : */
  132. 132 : exports.prototype['funding_account'] = undefined;
  133. 133 : /**
  134. 134 : * @member {module:models/CustomerAccountMinimalRequest} customer_account
  135. 135 : */
  136. 136 : exports.prototype['customer_account'] = undefined;
  137. 137 : /**
  138. 138 : * @member {module:models/PaymentScheduleVo} payment_schedule
  139. 139 : */
  140. 140 : exports.prototype['payment_schedule'] = undefined;
  141. 141 : /**
  142. 142 : * The additional information or meta-information that EBPP can accept, maintain and transmit back to the client.
  143. 143 : * @member {Object.<String, String>} custom_fields
  144. 144 : */
  145. 145 : exports.prototype['custom_fields'] = undefined;
  146. 146 : /**
  147. 147 : * Comments that can be used to recollect the operation performed on the resource object.
  148. 148 : * @member {String} comments
  149. 149 : */
  150. 150 : exports.prototype['comments'] = undefined;
  151. 151 :
  152. 152 :
  153. 153 : /**
  154. 154 : * Allowed values for the <code>payment_setup_schedule_type</code> property.
  155. 155 : * @enum {String}
  156. 156 : * @readonly
  157. 157 : */
  158. 158 : exports.PaymentSetupScheduleTypeEnum = {
  159. 159 : /**
  160. 160 : * value: "variable_recurring_enrollment"
  161. 161 : * @const
  162. 162 : */
  163. 163 : "variable_recurring_enrollment": "variable_recurring_enrollment",
  164. 164 : /**
  165. 165 : * value: "autopay_enrollment"
  166. 166 : * @const
  167. 167 : */
  168. 168 : "autopay_enrollment": "autopay_enrollment",
  169. 169 : /**
  170. 170 : * value: "payment_plan"
  171. 171 : * @const
  172. 172 : */
  173. 173 : "payment_plan": "payment_plan" };
  174. 174 :
  175. 175 :
  176. 176 : return exports;
  177. 177 : }));
  178. 178 :
  179. 179 :