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