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/FundingAccountAddress'], 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('./FundingAccountAddress'));
  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.SimplePaymentFundingAccountRequest = factory(root.OrbipayPaymentsapiClient.ApiClient, root.OrbipayPaymentsapiClient.FundingAccountAddress);
  14. 14 : }
  15. 15 : }(this, function(ApiClient, FundingAccountAddress) {
  16. 16 : 'use strict';
  17. 17 :
  18. 18 :
  19. 19 :
  20. 20 :
  21. 21 : /**
  22. 22 : * The SimplePaymentFundingAccountRequest model module.
  23. 23 : * @module models/SimplePaymentFundingAccountRequest
  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>SimplePaymentFundingAccountRequest</code>.
  30. 30 : * @alias module:models/SimplePaymentFundingAccountRequest
  31. 31 : * @class
  32. 32 : * @param account_holder_name {String} The name as specified on the account.
  33. 33 : * @param account_number {String} The number or reference that a customer uses to identify the funding account.
  34. 34 : */
  35. 35 : var exports = function(account_holder_name, account_number) {
  36. 36 : var _this = this;
  37. 37 :
  38. 38 : _this['account_holder_name'] = account_holder_name;
  39. 39 :
  40. 40 :
  41. 41 : _this['account_number'] = account_number;
  42. 42 :
  43. 43 :
  44. 44 :
  45. 45 :
  46. 46 :
  47. 47 :
  48. 48 : };
  49. 49 :
  50. 50 : /**
  51. 51 : * Constructs a <code>SimplePaymentFundingAccountRequest</code> from a plain JavaScript object, optionally creating a new instance.
  52. 52 : * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
  53. 53 : * @param {Object} data The plain JavaScript object bearing properties of interest.
  54. 54 : * @param {module:models/SimplePaymentFundingAccountRequest} obj Optional instance to populate.
  55. 55 : * @return {module:models/SimplePaymentFundingAccountRequest} The populated <code>SimplePaymentFundingAccountRequest</code> instance.
  56. 56 : */
  57. 57 : exports.constructFromObject = function(data, obj) {
  58. 58 : if (data) {
  59. 59 : obj = obj || new exports();
  60. 60 :
  61. 61 : if (data.hasOwnProperty('account_holder_name')) {
  62. 62 : obj['account_holder_name'] = ApiClient.convertToType(data['account_holder_name'], 'String');
  63. 63 : }
  64. 64 : if (data.hasOwnProperty('nickname')) {
  65. 65 : obj['nickname'] = ApiClient.convertToType(data['nickname'], 'String');
  66. 66 : }
  67. 67 : if (data.hasOwnProperty('address')) {
  68. 68 : obj['address'] = FundingAccountAddress.constructFromObject(data['address']);
  69. 69 : }
  70. 70 : if (data.hasOwnProperty('account_number')) {
  71. 71 : obj['account_number'] = ApiClient.convertToType(data['account_number'], 'String');
  72. 72 : }
  73. 73 : if (data.hasOwnProperty('aba_routing_number')) {
  74. 74 : obj['aba_routing_number'] = ApiClient.convertToType(data['aba_routing_number'], 'String');
  75. 75 : }
  76. 76 : if (data.hasOwnProperty('expiry_date')) {
  77. 77 : obj['expiry_date'] = ApiClient.convertToType(data['expiry_date'], 'String');
  78. 78 : }
  79. 79 : if (data.hasOwnProperty('account_holder_type')) {
  80. 80 : obj['account_holder_type'] = ApiClient.convertToType(data['account_holder_type'], 'String');
  81. 81 : }
  82. 82 : if (data.hasOwnProperty('custom_fields')) {
  83. 83 : obj['custom_fields'] = ApiClient.convertToType(data['custom_fields'], {'String': 'String'});
  84. 84 : }
  85. 85 : if (data.hasOwnProperty('account_subtype')) {
  86. 86 : obj['account_subtype'] = ApiClient.convertToType(data['account_subtype'], 'String');
  87. 87 : }
  88. 88 : if (data.hasOwnProperty('card_cvv_number')) {
  89. 89 : obj['card_cvv_number'] = ApiClient.convertToType(data['card_cvv_number'], 'String');
  90. 90 : }
  91. 91 : }
  92. 92 : return obj;
  93. 93 : };
  94. 94 :
  95. 95 : /**
  96. 96 : * The name as specified on the account.
  97. 97 : * @member {String} account_holder_name
  98. 98 : */
  99. 99 : exports.prototype['account_holder_name'] = undefined;
  100. 100 : /**
  101. 101 : * The nickname by which a customer might want to identify the account.
  102. 102 : * @member {String} nickname
  103. 103 : */
  104. 104 : exports.prototype['nickname'] = undefined;
  105. 105 : /**
  106. 106 : * @member {module:models/FundingAccountAddress} address
  107. 107 : */
  108. 108 : exports.prototype['address'] = undefined;
  109. 109 : /**
  110. 110 : * The number or reference that a customer uses to identify the funding account.
  111. 111 : * @member {String} account_number
  112. 112 : */
  113. 113 : exports.prototype['account_number'] = undefined;
  114. 114 : /**
  115. 115 : * The ABA/Routing number for the bank account.
  116. 116 : * @member {String} aba_routing_number
  117. 117 : */
  118. 118 : exports.prototype['aba_routing_number'] = undefined;
  119. 119 : /**
  120. 120 : * The expiry date for the card. This is to be in the format MM/YY. Only applicable for cards accounts.
  121. 121 : * @member {String} expiry_date
  122. 122 : */
  123. 123 : exports.prototype['expiry_date'] = undefined;
  124. 124 : /**
  125. 125 : * The type of ownership for the funding account. This is applicable only in the case of bank accounts.
  126. 126 : * @member {module:models/SimplePaymentFundingAccountRequest.AccountHolderTypeEnum} account_holder_type
  127. 127 : */
  128. 128 : exports.prototype['account_holder_type'] = undefined;
  129. 129 : /**
  130. 130 : * 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.
  131. 131 : * @member {Object.<String, String>} custom_fields
  132. 132 : */
  133. 133 : exports.prototype['custom_fields'] = undefined;
  134. 134 : /**
  135. 135 : * The sub type of the funding account. This is derived by EBPP in the case of card funding accounts. It needs to be passed when adding or editing a DDA/bank account. For e.g., a savings account, a checking account.
  136. 136 : * @member {module:models/SimplePaymentFundingAccountRequest.AccountSubtypeEnum} account_subtype
  137. 137 : */
  138. 138 : exports.prototype['account_subtype'] = undefined;
  139. 139 : /**
  140. 140 : * This is never returned by EBPP. This needs to be passed to EBPP when adding or editing a card funding account.
  141. 141 : * @member {String} card_cvv_number
  142. 142 : */
  143. 143 : exports.prototype['card_cvv_number'] = undefined;
  144. 144 :
  145. 145 :
  146. 146 : /**
  147. 147 : * Allowed values for the <code>account_holder_type</code> property.
  148. 148 : * @enum {String}
  149. 149 : * @readonly
  150. 150 : */
  151. 151 : exports.AccountHolderTypeEnum = {
  152. 152 : /**
  153. 153 : * value: "personal"
  154. 154 : * @const
  155. 155 : */
  156. 156 : "personal": "personal",
  157. 157 : /**
  158. 158 : * value: "business"
  159. 159 : * @const
  160. 160 : */
  161. 161 : "business": "business" };
  162. 162 :
  163. 163 : /**
  164. 164 : * Allowed values for the <code>account_subtype</code> property.
  165. 165 : * @enum {String}
  166. 166 : * @readonly
  167. 167 : */
  168. 168 : exports.AccountSubtypeEnum = {
  169. 169 : /**
  170. 170 : * value: "savings"
  171. 171 : * @const
  172. 172 : */
  173. 173 : "savings": "savings",
  174. 174 : /**
  175. 175 : * value: "checking"
  176. 176 : * @const
  177. 177 : */
  178. 178 : "checking": "checking",
  179. 179 : /**
  180. 180 : * value: "money_market"
  181. 181 : * @const
  182. 182 : */
  183. 183 : "money_market": "money_market",
  184. 184 : /**
  185. 185 : * value: "visa_credit"
  186. 186 : * @const
  187. 187 : */
  188. 188 : "visa_credit": "visa_credit",
  189. 189 : /**
  190. 190 : * value: "mastercard_credit"
  191. 191 : * @const
  192. 192 : */
  193. 193 : "mastercard_credit": "mastercard_credit",
  194. 194 : /**
  195. 195 : * value: "american_express_credit"
  196. 196 : * @const
  197. 197 : */
  198. 198 : "american_express_credit": "american_express_credit",
  199. 199 : /**
  200. 200 : * value: "discover_credit"
  201. 201 : * @const
  202. 202 : */
  203. 203 : "discover_credit": "discover_credit",
  204. 204 : /**
  205. 205 : * value: "visa_debit"
  206. 206 : * @const
  207. 207 : */
  208. 208 : "visa_debit": "visa_debit",
  209. 209 : /**
  210. 210 : * value: "mastercard_debit"
  211. 211 : * @const
  212. 212 : */
  213. 213 : "mastercard_debit": "mastercard_debit",
  214. 214 : /**
  215. 215 : * value: "discover_debit"
  216. 216 : * @const
  217. 217 : */
  218. 218 : "discover_debit": "discover_debit" };
  219. 219 :
  220. 220 :
  221. 221 : return exports;
  222. 222 : }));
  223. 223 :
  224. 224 :