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.
  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.
  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.
  140. 140 : * @member {module:models/AddFundingAccountRequest.AccountSubtypeEnum} account_subtype
  141. 141 : */
  142. 142 : exports.prototype['account_subtype'] = undefined;
  143. 143 : /**
  144. 144 : * @member {String} card_cvv_number
  145. 145 : */
  146. 146 : exports.prototype['card_cvv_number'] = undefined;
  147. 147 : /**
  148. 148 : * Comments that can be used to recollect the operation performed on the resource object.
  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>account_holder_type</code> property.
  156. 156 : * @enum {String}
  157. 157 : * @readonly
  158. 158 : */
  159. 159 : exports.AccountHolderTypeEnum = {
  160. 160 : /**
  161. 161 : * value: "personal"
  162. 162 : * @const
  163. 163 : */
  164. 164 : "personal": "personal",
  165. 165 : /**
  166. 166 : * value: "business"
  167. 167 : * @const
  168. 168 : */
  169. 169 : "business": "business" };
  170. 170 :
  171. 171 : /**
  172. 172 : * Allowed values for the <code>account_subtype</code> property.
  173. 173 : * @enum {String}
  174. 174 : * @readonly
  175. 175 : */
  176. 176 : exports.AccountSubtypeEnum = {
  177. 177 : /**
  178. 178 : * value: "savings"
  179. 179 : * @const
  180. 180 : */
  181. 181 : "savings": "savings",
  182. 182 : /**
  183. 183 : * value: "checking"
  184. 184 : * @const
  185. 185 : */
  186. 186 : "checking": "checking",
  187. 187 : /**
  188. 188 : * value: "money_market"
  189. 189 : * @const
  190. 190 : */
  191. 191 : "money_market": "money_market",
  192. 192 : /**
  193. 193 : * value: "visa_credit"
  194. 194 : * @const
  195. 195 : */
  196. 196 : "visa_credit": "visa_credit",
  197. 197 : /**
  198. 198 : * value: "mastercard_credit"
  199. 199 : * @const
  200. 200 : */
  201. 201 : "mastercard_credit": "mastercard_credit",
  202. 202 : /**
  203. 203 : * value: "american_express_credit"
  204. 204 : * @const
  205. 205 : */
  206. 206 : "american_express_credit": "american_express_credit",
  207. 207 : /**
  208. 208 : * value: "discover_credit"
  209. 209 : * @const
  210. 210 : */
  211. 211 : "discover_credit": "discover_credit",
  212. 212 : /**
  213. 213 : * value: "visa_debit"
  214. 214 : * @const
  215. 215 : */
  216. 216 : "visa_debit": "visa_debit",
  217. 217 : /**
  218. 218 : * value: "mastercard_debit"
  219. 219 : * @const
  220. 220 : */
  221. 221 : "mastercard_debit": "mastercard_debit",
  222. 222 : /**
  223. 223 : * value: "discover_debit"
  224. 224 : * @const
  225. 225 : */
  226. 226 : "discover_debit": "discover_debit",
  227. 227 : /**
  228. 228 : * value: "voyager_fleet"
  229. 229 : * @const
  230. 230 : */
  231. 231 : "voyager_fleet": "voyager_fleet" };
  232. 232 :
  233. 233 :
  234. 234 : return exports;
  235. 235 : }));
  236. 236 :
  237. 237 :