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