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/AddressVo', 'models/AuditInfoVo', 'models/CustomersCustomerAccountsResponse', 'models/CustomersFundingAccountsResponse', 'models/CustomersPaymentSetupsResponse', 'models/CustomersPaymentsResponse'], 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('./AddressVo'), require('./AuditInfoVo'), require('./CustomersCustomerAccountsResponse'), require('./CustomersFundingAccountsResponse'), require('./CustomersPaymentSetupsResponse'), require('./CustomersPaymentsResponse'));
  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.CustomerResponse = factory(root.OrbipayPaymentsapiClient.ApiClient, root.OrbipayPaymentsapiClient.AddressVo, root.OrbipayPaymentsapiClient.AuditInfoVo, root.OrbipayPaymentsapiClient.CustomersCustomerAccountsResponse, root.OrbipayPaymentsapiClient.CustomersFundingAccountsResponse, root.OrbipayPaymentsapiClient.CustomersPaymentSetupsResponse, root.OrbipayPaymentsapiClient.CustomersPaymentsResponse);
  14. 14 : }
  15. 15 : }(this, function(ApiClient, AddressVo, AuditInfoVo, CustomersCustomerAccountsResponse, CustomersFundingAccountsResponse, CustomersPaymentSetupsResponse, CustomersPaymentsResponse) {
  16. 16 : 'use strict';
  17. 17 :
  18. 18 :
  19. 19 :
  20. 20 :
  21. 21 : /**
  22. 22 : * The CustomerResponse model module.
  23. 23 : * @module models/CustomerResponse
  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>CustomerResponse</code>.
  30. 30 : * @alias module:models/CustomerResponse
  31. 31 : * @class
  32. 32 : * @param id {String} The unique identifier assigned by EBPP to the customer.
  33. 33 : * @param status {module:models/CustomerResponse.StatusEnum} The status of the customer in EBPP.
  34. 34 : */
  35. 35 : var exports = function(id, status) {
  36. 36 : var _this = this;
  37. 37 :
  38. 38 :
  39. 39 :
  40. 40 :
  41. 41 :
  42. 42 :
  43. 43 :
  44. 44 :
  45. 45 :
  46. 46 :
  47. 47 :
  48. 48 :
  49. 49 :
  50. 50 :
  51. 51 :
  52. 52 :
  53. 53 : _this['id'] = id;
  54. 54 : _this['status'] = status;
  55. 55 :
  56. 56 :
  57. 57 :
  58. 58 :
  59. 59 :
  60. 60 :
  61. 61 :
  62. 62 : };
  63. 63 :
  64. 64 : /**
  65. 65 : * Constructs a <code>CustomerResponse</code> from a plain JavaScript object, optionally creating a new instance.
  66. 66 : * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
  67. 67 : * @param {Object} data The plain JavaScript object bearing properties of interest.
  68. 68 : * @param {module:models/CustomerResponse} obj Optional instance to populate.
  69. 69 : * @return {module:models/CustomerResponse} The populated <code>CustomerResponse</code> instance.
  70. 70 : */
  71. 71 : exports.constructFromObject = function(data, obj) {
  72. 72 : if (data) {
  73. 73 : obj = obj || new exports();
  74. 74 :
  75. 75 : if (data.hasOwnProperty('first_name')) {
  76. 76 : obj['first_name'] = ApiClient.convertToType(data['first_name'], 'String');
  77. 77 : }
  78. 78 : if (data.hasOwnProperty('last_name')) {
  79. 79 : obj['last_name'] = ApiClient.convertToType(data['last_name'], 'String');
  80. 80 : }
  81. 81 : if (data.hasOwnProperty('middle_name')) {
  82. 82 : obj['middle_name'] = ApiClient.convertToType(data['middle_name'], 'String');
  83. 83 : }
  84. 84 : if (data.hasOwnProperty('gender')) {
  85. 85 : obj['gender'] = ApiClient.convertToType(data['gender'], 'String');
  86. 86 : }
  87. 87 : if (data.hasOwnProperty('date_of_birth')) {
  88. 88 : obj['date_of_birth'] = ApiClient.convertToType(data['date_of_birth'], 'String');
  89. 89 : }
  90. 90 : if (data.hasOwnProperty('ssn')) {
  91. 91 : obj['ssn'] = ApiClient.convertToType(data['ssn'], 'String');
  92. 92 : }
  93. 93 : if (data.hasOwnProperty('locale')) {
  94. 94 : obj['locale'] = ApiClient.convertToType(data['locale'], 'String');
  95. 95 : }
  96. 96 : if (data.hasOwnProperty('email')) {
  97. 97 : obj['email'] = ApiClient.convertToType(data['email'], 'String');
  98. 98 : }
  99. 99 : if (data.hasOwnProperty('registered_email')) {
  100. 100 : obj['registered_email'] = ApiClient.convertToType(data['registered_email'], 'String');
  101. 101 : }
  102. 102 : if (data.hasOwnProperty('home_phone')) {
  103. 103 : obj['home_phone'] = ApiClient.convertToType(data['home_phone'], 'String');
  104. 104 : }
  105. 105 : if (data.hasOwnProperty('work_phone')) {
  106. 106 : obj['work_phone'] = ApiClient.convertToType(data['work_phone'], 'String');
  107. 107 : }
  108. 108 : if (data.hasOwnProperty('mobile_phone')) {
  109. 109 : obj['mobile_phone'] = ApiClient.convertToType(data['mobile_phone'], 'String');
  110. 110 : }
  111. 111 : if (data.hasOwnProperty('address')) {
  112. 112 : obj['address'] = AddressVo.constructFromObject(data['address']);
  113. 113 : }
  114. 114 : if (data.hasOwnProperty('custom_fields')) {
  115. 115 : obj['custom_fields'] = ApiClient.convertToType(data['custom_fields'], {'String': 'String'});
  116. 116 : }
  117. 117 : if (data.hasOwnProperty('customer_reference')) {
  118. 118 : obj['customer_reference'] = ApiClient.convertToType(data['customer_reference'], 'String');
  119. 119 : }
  120. 120 : if (data.hasOwnProperty('id')) {
  121. 121 : obj['id'] = ApiClient.convertToType(data['id'], 'String');
  122. 122 : }
  123. 123 : if (data.hasOwnProperty('status')) {
  124. 124 : obj['status'] = ApiClient.convertToType(data['status'], 'String');
  125. 125 : }
  126. 126 : if (data.hasOwnProperty('url')) {
  127. 127 : obj['url'] = ApiClient.convertToType(data['url'], 'String');
  128. 128 : }
  129. 129 : if (data.hasOwnProperty('comments')) {
  130. 130 : obj['comments'] = ApiClient.convertToType(data['comments'], 'String');
  131. 131 : }
  132. 132 : if (data.hasOwnProperty('customer_accounts')) {
  133. 133 : obj['customer_accounts'] = CustomersCustomerAccountsResponse.constructFromObject(data['customer_accounts']);
  134. 134 : }
  135. 135 : if (data.hasOwnProperty('funding_accounts')) {
  136. 136 : obj['funding_accounts'] = CustomersFundingAccountsResponse.constructFromObject(data['funding_accounts']);
  137. 137 : }
  138. 138 : if (data.hasOwnProperty('payments')) {
  139. 139 : obj['payments'] = CustomersPaymentsResponse.constructFromObject(data['payments']);
  140. 140 : }
  141. 141 : if (data.hasOwnProperty('payment_setups')) {
  142. 142 : obj['payment_setups'] = CustomersPaymentSetupsResponse.constructFromObject(data['payment_setups']);
  143. 143 : }
  144. 144 : if (data.hasOwnProperty('audit_info')) {
  145. 145 : obj['audit_info'] = AuditInfoVo.constructFromObject(data['audit_info']);
  146. 146 : }
  147. 147 : }
  148. 148 : return obj;
  149. 149 : };
  150. 150 :
  151. 151 : /**
  152. 152 : * The first name of the customer. Either first_name or last_name is required to create a customer.
  153. 153 : * @member {String} first_name
  154. 154 : */
  155. 155 : exports.prototype['first_name'] = undefined;
  156. 156 : /**
  157. 157 : * The last name of the customer. Either first_name or last_name is required to create a customer.
  158. 158 : * @member {String} last_name
  159. 159 : */
  160. 160 : exports.prototype['last_name'] = undefined;
  161. 161 : /**
  162. 162 : * The middle name of the customer.
  163. 163 : * @member {String} middle_name
  164. 164 : */
  165. 165 : exports.prototype['middle_name'] = undefined;
  166. 166 : /**
  167. 167 : * The gender of the customer.
  168. 168 : * @member {module:models/CustomerResponse.GenderEnum} gender
  169. 169 : */
  170. 170 : exports.prototype['gender'] = undefined;
  171. 171 : /**
  172. 172 : * The date of birth of the customer. It should be in the full-date format as per ISO8601, namely, YYYY-MM-DD.
  173. 173 : * @member {String} date_of_birth
  174. 174 : */
  175. 175 : exports.prototype['date_of_birth'] = undefined;
  176. 176 : /**
  177. 177 : * The SSN of the customer if the account holder is an individual or the tax ID, if the customer is a business.
  178. 178 : * @member {String} ssn
  179. 179 : */
  180. 180 : exports.prototype['ssn'] = undefined;
  181. 181 : /**
  182. 182 : * The language in which the customer wants the alerts and notifications from EBPP. This is to be specified in the format,<br><i>< <b>ISO-639-1 language code</b> >_< <b>ISO ALPHA-2 Country Code</b> ></i>.<br> For e.g., <b>en_US</b> indicates the language preference as US English, which is also the default value.
  183. 183 : * @member {String} locale
  184. 184 : */
  185. 185 : exports.prototype['locale'] = undefined;
  186. 186 : /**
  187. 187 : * The email address of the customer to which notifications from EBPP will be sent. This will default to the registered_email while creating a customer.
  188. 188 : * @member {String} email
  189. 189 : */
  190. 190 : exports.prototype['email'] = undefined;
  191. 191 : /**
  192. 192 : * The email address of the customer registered with the client. This may be used to uniquely identify the customer if the client is set up accordingly in EBPP.
  193. 193 : * @member {String} registered_email
  194. 194 : */
  195. 195 : exports.prototype['registered_email'] = undefined;
  196. 196 : /**
  197. 197 : * The home phone number of the customer.
  198. 198 : * @member {String} home_phone
  199. 199 : */
  200. 200 : exports.prototype['home_phone'] = undefined;
  201. 201 : /**
  202. 202 : * The work phone number of the customer.
  203. 203 : * @member {String} work_phone
  204. 204 : */
  205. 205 : exports.prototype['work_phone'] = undefined;
  206. 206 : /**
  207. 207 : * The mobile phone number of the customer.
  208. 208 : * @member {String} mobile_phone
  209. 209 : */
  210. 210 : exports.prototype['mobile_phone'] = undefined;
  211. 211 : /**
  212. 212 : * @member {module:models/AddressVo} address
  213. 213 : */
  214. 214 : exports.prototype['address'] = undefined;
  215. 215 : /**
  216. 216 : * 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.
  217. 217 : * @member {Object.<String, String>} custom_fields
  218. 218 : */
  219. 219 : exports.prototype['custom_fields'] = undefined;
  220. 220 : /**
  221. 221 : * The unique identifier in the client system for the customer.
  222. 222 : * @member {String} customer_reference
  223. 223 : */
  224. 224 : exports.prototype['customer_reference'] = undefined;
  225. 225 : /**
  226. 226 : * The unique identifier assigned by EBPP to the customer.
  227. 227 : * @member {String} id
  228. 228 : */
  229. 229 : exports.prototype['id'] = undefined;
  230. 230 : /**
  231. 231 : * The status of the customer in EBPP.
  232. 232 : * @member {module:models/CustomerResponse.StatusEnum} status
  233. 233 : */
  234. 234 : exports.prototype['status'] = undefined;
  235. 235 : /**
  236. 236 : * This URL fetches the Customer details.
  237. 237 : * @member {String} url
  238. 238 : */
  239. 239 : exports.prototype['url'] = undefined;
  240. 240 : /**
  241. 241 : * 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.
  242. 242 : * @member {String} comments
  243. 243 : */
  244. 244 : exports.prototype['comments'] = undefined;
  245. 245 : /**
  246. 246 : * @member {module:models/CustomersCustomerAccountsResponse} customer_accounts
  247. 247 : */
  248. 248 : exports.prototype['customer_accounts'] = undefined;
  249. 249 : /**
  250. 250 : * @member {module:models/CustomersFundingAccountsResponse} funding_accounts
  251. 251 : */
  252. 252 : exports.prototype['funding_accounts'] = undefined;
  253. 253 : /**
  254. 254 : * @member {module:models/CustomersPaymentsResponse} payments
  255. 255 : */
  256. 256 : exports.prototype['payments'] = undefined;
  257. 257 : /**
  258. 258 : * @member {module:models/CustomersPaymentSetupsResponse} payment_setups
  259. 259 : */
  260. 260 : exports.prototype['payment_setups'] = undefined;
  261. 261 : /**
  262. 262 : * @member {module:models/AuditInfoVo} audit_info
  263. 263 : */
  264. 264 : exports.prototype['audit_info'] = undefined;
  265. 265 :
  266. 266 :
  267. 267 : /**
  268. 268 : * Allowed values for the <code>gender</code> property.
  269. 269 : * @enum {String}
  270. 270 : * @readonly
  271. 271 : */
  272. 272 : exports.GenderEnum = {
  273. 273 : /**
  274. 274 : * value: "male"
  275. 275 : * @const
  276. 276 : */
  277. 277 : "male": "male",
  278. 278 : /**
  279. 279 : * value: "female"
  280. 280 : * @const
  281. 281 : */
  282. 282 : "female": "female" };
  283. 283 :
  284. 284 : /**
  285. 285 : * Allowed values for the <code>status</code> property.
  286. 286 : * @enum {String}
  287. 287 : * @readonly
  288. 288 : */
  289. 289 : exports.StatusEnum = {
  290. 290 : /**
  291. 291 : * value: "active"
  292. 292 : * @const
  293. 293 : */
  294. 294 : "active": "active",
  295. 295 : /**
  296. 296 : * value: "revoked"
  297. 297 : * @const
  298. 298 : */
  299. 299 : "revoked": "revoked",
  300. 300 : /**
  301. 301 : * value: "suspended"
  302. 302 : * @const
  303. 303 : */
  304. 304 : "suspended": "suspended" };
  305. 305 :
  306. 306 :
  307. 307 : return exports;
  308. 308 : }));
  309. 309 :
  310. 310 :