(function(root, factory) {
  if (typeof define === 'function' && define.amd) {
    // AMD. Register as an anonymous module.
    define(['ApiClient', 'models/AddressVo', 'models/CreateCustomerAccountRequest'], factory);
  } else if (typeof module === 'object' && module.exports) {
    // CommonJS-like environments that support module.exports, like Node.
    module.exports = factory(require('../ApiClient'), require('./AddressVo'), require('./CreateCustomerAccountRequest'));
  } else {
    // Browser globals (root is window)
    if (!root.OrbipayPaymentsapiClient) {
      root.OrbipayPaymentsapiClient = {};
    }
    root.OrbipayPaymentsapiClient.CreateCustomerRequest = factory(root.OrbipayPaymentsapiClient.ApiClient, root.OrbipayPaymentsapiClient.AddressVo, root.OrbipayPaymentsapiClient.CreateCustomerAccountRequest);
  }
}(this, function(ApiClient, AddressVo, CreateCustomerAccountRequest) {
  'use strict';




  /**
   * The CreateCustomerRequest model module.
   * @module models/CreateCustomerRequest
   */

  /**
   * <h3 style="color:red"> This class subject to change without prior notice, Please dont use this class directly. </h3>

   * Constructs a new <code>CreateCustomerRequest</code>.
   * @alias module:models/CreateCustomerRequest
   * @class
   * @param customer_accounts {Array.<module:models/CreateCustomerAccountRequest>} 
   */
  var exports = function(customer_accounts) {
    var _this = this;

    _this['customer_accounts'] = customer_accounts;
















  };

  /**
   * Constructs a <code>CreateCustomerRequest</code> from a plain JavaScript object, optionally creating a new instance.
   * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
   * @param {Object} data The plain JavaScript object bearing properties of interest.
   * @param {module:models/CreateCustomerRequest} obj Optional instance to populate.
   * @return {module:models/CreateCustomerRequest} The populated <code>CreateCustomerRequest</code> instance.
   */
  exports.constructFromObject = function(data, obj) {
    if (data) {
      obj = obj || new exports();

      if (data.hasOwnProperty('customer_accounts')) {
        obj['customer_accounts'] = ApiClient.convertToType(data['customer_accounts'], [CreateCustomerAccountRequest]);
      }
      if (data.hasOwnProperty('comments')) {
        obj['comments'] = ApiClient.convertToType(data['comments'], 'String');
      }
      if (data.hasOwnProperty('customer_reference')) {
        obj['customer_reference'] = ApiClient.convertToType(data['customer_reference'], 'String');
      }
      if (data.hasOwnProperty('first_name')) {
        obj['first_name'] = ApiClient.convertToType(data['first_name'], 'String');
      }
      if (data.hasOwnProperty('last_name')) {
        obj['last_name'] = ApiClient.convertToType(data['last_name'], 'String');
      }
      if (data.hasOwnProperty('middle_name')) {
        obj['middle_name'] = ApiClient.convertToType(data['middle_name'], 'String');
      }
      if (data.hasOwnProperty('gender')) {
        obj['gender'] = ApiClient.convertToType(data['gender'], 'String');
      }
      if (data.hasOwnProperty('date_of_birth')) {
        obj['date_of_birth'] = ApiClient.convertToType(data['date_of_birth'], 'String');
      }
      if (data.hasOwnProperty('ssn')) {
        obj['ssn'] = ApiClient.convertToType(data['ssn'], 'String');
      }
      if (data.hasOwnProperty('locale')) {
        obj['locale'] = ApiClient.convertToType(data['locale'], 'String');
      }
      if (data.hasOwnProperty('email')) {
        obj['email'] = ApiClient.convertToType(data['email'], 'String');
      }
      if (data.hasOwnProperty('registered_email')) {
        obj['registered_email'] = ApiClient.convertToType(data['registered_email'], 'String');
      }
      if (data.hasOwnProperty('home_phone')) {
        obj['home_phone'] = ApiClient.convertToType(data['home_phone'], 'String');
      }
      if (data.hasOwnProperty('work_phone')) {
        obj['work_phone'] = ApiClient.convertToType(data['work_phone'], 'String');
      }
      if (data.hasOwnProperty('mobile_phone')) {
        obj['mobile_phone'] = ApiClient.convertToType(data['mobile_phone'], 'String');
      }
      if (data.hasOwnProperty('address')) {
        obj['address'] = AddressVo.constructFromObject(data['address']);
      }
      if (data.hasOwnProperty('custom_fields')) {
        obj['custom_fields'] = ApiClient.convertToType(data['custom_fields'], {'String': 'String'});
      }
    }
    return obj;
  };

  /**
   * @member {Array.<module:models/CreateCustomerAccountRequest>} customer_accounts
   */
  exports.prototype['customer_accounts'] = undefined;
  /**
   * Comments that can be used to recollect the operation performed on the resource object.
   * @member {String} comments
   */
  exports.prototype['comments'] = undefined;
  /**
   * The unique identifier in the client system for the customer.
   * @member {String} customer_reference
   */
  exports.prototype['customer_reference'] = undefined;
  /**
   * The first name of the customer.
   * @member {String} first_name
   */
  exports.prototype['first_name'] = undefined;
  /**
   * The last name of the customer.
   * @member {String} last_name
   */
  exports.prototype['last_name'] = undefined;
  /**
   * The middle name of the customer.
   * @member {String} middle_name
   */
  exports.prototype['middle_name'] = undefined;
  /**
   * The gender of the customer.
   * @member {module:models/CreateCustomerRequest.GenderEnum} gender
   */
  exports.prototype['gender'] = undefined;
  /**
   * The date of birth of the customer. It should be in the full-date format as per ISO8601, namely, YYYY-MM-DD.
   * @member {String} date_of_birth
   */
  exports.prototype['date_of_birth'] = undefined;
  /**
   * The SSN of the customer if the account holder is an individual or the tax ID, if the customer is a business.
   * @member {String} ssn
   */
  exports.prototype['ssn'] = undefined;
  /**
   * 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.
   * @member {String} locale
   */
  exports.prototype['locale'] = undefined;
  /**
   * The email address of the customer to which notifications from EBPP will be sent.
   * @member {String} email
   */
  exports.prototype['email'] = undefined;
  /**
   * 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.
   * @member {String} registered_email
   */
  exports.prototype['registered_email'] = undefined;
  /**
   * The home phone number of the customer.
   * @member {String} home_phone
   */
  exports.prototype['home_phone'] = undefined;
  /**
   * The work phone number of the customer.
   * @member {String} work_phone
   */
  exports.prototype['work_phone'] = undefined;
  /**
   * The mobile phone number of the customer.
   * @member {String} mobile_phone
   */
  exports.prototype['mobile_phone'] = undefined;
  /**
   * @member {module:models/AddressVo} address
   */
  exports.prototype['address'] = undefined;
  /**
   * The additional information or meta-information that EBPP can accept, maintain and transmit back to the client. 
   * @member {Object.<String, String>} custom_fields
   */
  exports.prototype['custom_fields'] = undefined;


  /**
   * Allowed values for the <code>gender</code> property.
   * @enum {String}
   * @readonly
   */
  exports.GenderEnum = {
    /**
     * value: "male"
     * @const
     */
    "male": "male",
    /**
     * value: "female"
     * @const
     */
    "female": "female"  };


  return exports;
}));