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