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/CreateCustomerAccountRequest'], 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('./CreateCustomerAccountRequest'));
  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.CreateCustomerRequest = factory(root.OrbipayPaymentsapiClient.ApiClient, root.OrbipayPaymentsapiClient.AddressVo, root.OrbipayPaymentsapiClient.CreateCustomerAccountRequest);
  14. 14 : }
  15. 15 : }(this, function(ApiClient, AddressVo, CreateCustomerAccountRequest) {
  16. 16 : 'use strict';
  17. 17 :
  18. 18 :
  19. 19 :
  20. 20 :
  21. 21 : /**
  22. 22 : * The CreateCustomerRequest model module.
  23. 23 : * @module models/CreateCustomerRequest
  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>CreateCustomerRequest</code>.
  30. 30 : * @alias module:models/CreateCustomerRequest
  31. 31 : * @class
  32. 32 : * @param customer_accounts {Array.<module:models/CreateCustomerAccountRequest>}
  33. 33 : */
  34. 34 : var exports = function(customer_accounts) {
  35. 35 : var _this = this;
  36. 36 :
  37. 37 : _this['customer_accounts'] = customer_accounts;
  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 :
  54. 54 : };
  55. 55 :
  56. 56 : /**
  57. 57 : * Constructs a <code>CreateCustomerRequest</code> from a plain JavaScript object, optionally creating a new instance.
  58. 58 : * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
  59. 59 : * @param {Object} data The plain JavaScript object bearing properties of interest.
  60. 60 : * @param {module:models/CreateCustomerRequest} obj Optional instance to populate.
  61. 61 : * @return {module:models/CreateCustomerRequest} The populated <code>CreateCustomerRequest</code> instance.
  62. 62 : */
  63. 63 : exports.constructFromObject = function(data, obj) {
  64. 64 : if (data) {
  65. 65 : obj = obj || new exports();
  66. 66 :
  67. 67 : if (data.hasOwnProperty('customer_accounts')) {
  68. 68 : obj['customer_accounts'] = ApiClient.convertToType(data['customer_accounts'], [CreateCustomerAccountRequest]);
  69. 69 : }
  70. 70 : if (data.hasOwnProperty('comments')) {
  71. 71 : obj['comments'] = ApiClient.convertToType(data['comments'], 'String');
  72. 72 : }
  73. 73 : if (data.hasOwnProperty('customer_reference')) {
  74. 74 : obj['customer_reference'] = ApiClient.convertToType(data['customer_reference'], 'String');
  75. 75 : }
  76. 76 : if (data.hasOwnProperty('first_name')) {
  77. 77 : obj['first_name'] = ApiClient.convertToType(data['first_name'], 'String');
  78. 78 : }
  79. 79 : if (data.hasOwnProperty('last_name')) {
  80. 80 : obj['last_name'] = ApiClient.convertToType(data['last_name'], 'String');
  81. 81 : }
  82. 82 : if (data.hasOwnProperty('middle_name')) {
  83. 83 : obj['middle_name'] = ApiClient.convertToType(data['middle_name'], 'String');
  84. 84 : }
  85. 85 : if (data.hasOwnProperty('gender')) {
  86. 86 : obj['gender'] = ApiClient.convertToType(data['gender'], 'String');
  87. 87 : }
  88. 88 : if (data.hasOwnProperty('date_of_birth')) {
  89. 89 : obj['date_of_birth'] = ApiClient.convertToType(data['date_of_birth'], 'String');
  90. 90 : }
  91. 91 : if (data.hasOwnProperty('ssn')) {
  92. 92 : obj['ssn'] = ApiClient.convertToType(data['ssn'], 'String');
  93. 93 : }
  94. 94 : if (data.hasOwnProperty('locale')) {
  95. 95 : obj['locale'] = ApiClient.convertToType(data['locale'], 'String');
  96. 96 : }
  97. 97 : if (data.hasOwnProperty('email')) {
  98. 98 : obj['email'] = ApiClient.convertToType(data['email'], 'String');
  99. 99 : }
  100. 100 : if (data.hasOwnProperty('registered_email')) {
  101. 101 : obj['registered_email'] = ApiClient.convertToType(data['registered_email'], 'String');
  102. 102 : }
  103. 103 : if (data.hasOwnProperty('home_phone')) {
  104. 104 : obj['home_phone'] = ApiClient.convertToType(data['home_phone'], 'String');
  105. 105 : }
  106. 106 : if (data.hasOwnProperty('work_phone')) {
  107. 107 : obj['work_phone'] = ApiClient.convertToType(data['work_phone'], 'String');
  108. 108 : }
  109. 109 : if (data.hasOwnProperty('mobile_phone')) {
  110. 110 : obj['mobile_phone'] = ApiClient.convertToType(data['mobile_phone'], 'String');
  111. 111 : }
  112. 112 : if (data.hasOwnProperty('address')) {
  113. 113 : obj['address'] = AddressVo.constructFromObject(data['address']);
  114. 114 : }
  115. 115 : if (data.hasOwnProperty('custom_fields')) {
  116. 116 : obj['custom_fields'] = ApiClient.convertToType(data['custom_fields'], {'String': 'String'});
  117. 117 : }
  118. 118 : }
  119. 119 : return obj;
  120. 120 : };
  121. 121 :
  122. 122 : /**
  123. 123 : * @member {Array.<module:models/CreateCustomerAccountRequest>} customer_accounts
  124. 124 : */
  125. 125 : exports.prototype['customer_accounts'] = undefined;
  126. 126 : /**
  127. 127 : * Comments that can be used to recollect the operation performed on the resource object.
  128. 128 : * @member {String} comments
  129. 129 : */
  130. 130 : exports.prototype['comments'] = undefined;
  131. 131 : /**
  132. 132 : * The unique identifier in the client system for the customer.
  133. 133 : * @member {String} customer_reference
  134. 134 : */
  135. 135 : exports.prototype['customer_reference'] = undefined;
  136. 136 : /**
  137. 137 : * The first name of the customer.
  138. 138 : * @member {String} first_name
  139. 139 : */
  140. 140 : exports.prototype['first_name'] = undefined;
  141. 141 : /**
  142. 142 : * The last name of the customer.
  143. 143 : * @member {String} last_name
  144. 144 : */
  145. 145 : exports.prototype['last_name'] = undefined;
  146. 146 : /**
  147. 147 : * The middle name of the customer.
  148. 148 : * @member {String} middle_name
  149. 149 : */
  150. 150 : exports.prototype['middle_name'] = undefined;
  151. 151 : /**
  152. 152 : * The gender of the customer.
  153. 153 : * @member {module:models/CreateCustomerRequest.GenderEnum} gender
  154. 154 : */
  155. 155 : exports.prototype['gender'] = undefined;
  156. 156 : /**
  157. 157 : * The date of birth of the customer. It should be in the full-date format as per ISO8601, namely, YYYY-MM-DD.
  158. 158 : * @member {String} date_of_birth
  159. 159 : */
  160. 160 : exports.prototype['date_of_birth'] = undefined;
  161. 161 : /**
  162. 162 : * The SSN of the customer if the account holder is an individual or the tax ID, if the customer is a business.
  163. 163 : * @member {String} ssn
  164. 164 : */
  165. 165 : exports.prototype['ssn'] = undefined;
  166. 166 : /**
  167. 167 : * 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.
  168. 168 : * @member {String} locale
  169. 169 : */
  170. 170 : exports.prototype['locale'] = undefined;
  171. 171 : /**
  172. 172 : * The email address of the customer to which notifications from EBPP will be sent.
  173. 173 : * @member {String} email
  174. 174 : */
  175. 175 : exports.prototype['email'] = undefined;
  176. 176 : /**
  177. 177 : * 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.
  178. 178 : * @member {String} registered_email
  179. 179 : */
  180. 180 : exports.prototype['registered_email'] = undefined;
  181. 181 : /**
  182. 182 : * The home phone number of the customer.
  183. 183 : * @member {String} home_phone
  184. 184 : */
  185. 185 : exports.prototype['home_phone'] = undefined;
  186. 186 : /**
  187. 187 : * The work phone number of the customer.
  188. 188 : * @member {String} work_phone
  189. 189 : */
  190. 190 : exports.prototype['work_phone'] = undefined;
  191. 191 : /**
  192. 192 : * The mobile phone number of the customer.
  193. 193 : * @member {String} mobile_phone
  194. 194 : */
  195. 195 : exports.prototype['mobile_phone'] = undefined;
  196. 196 : /**
  197. 197 : * @member {module:models/AddressVo} address
  198. 198 : */
  199. 199 : exports.prototype['address'] = undefined;
  200. 200 : /**
  201. 201 : * The additional information or meta-information that EBPP can accept, maintain and transmit back to the client.
  202. 202 : * @member {Object.<String, String>} custom_fields
  203. 203 : */
  204. 204 : exports.prototype['custom_fields'] = undefined;
  205. 205 :
  206. 206 :
  207. 207 : /**
  208. 208 : * Allowed values for the <code>gender</code> property.
  209. 209 : * @enum {String}
  210. 210 : * @readonly
  211. 211 : */
  212. 212 : exports.GenderEnum = {
  213. 213 : /**
  214. 214 : * value: "male"
  215. 215 : * @const
  216. 216 : */
  217. 217 : "male": "male",
  218. 218 : /**
  219. 219 : * value: "female"
  220. 220 : * @const
  221. 221 : */
  222. 222 : "female": "female" };
  223. 223 :
  224. 224 :
  225. 225 : return exports;
  226. 226 : }));
  227. 227 :
  228. 228 :