docs: function Client(key, password, endpoint) {
    if (!(this instanceof Client)) {
      return new Client(key, password, endpoint);
    }
  
    endpoint = typeof endpoint !== 'undefined' ? endpoint : Client.MODE_SANDBOX;
  
    var _key = key,
      _password = password,
      _endpoint = endpoint,
      _errors = [],
      _isValid = false;
  
    var emptyErrors = function () {
      _errors = [];
    };
  
    var addError = function (errorCode) {
      if (_errors.indexOf(errorCode) < 0) {
        _errors.push(errorCode);
      }
      _isValid = false;
    };
  
    var validate = function () {
      _isValid = true;
      if (!_key || !_password) {
        addError(ClientError.INVALID_CREDENTIAL);
      } else if (!_endpoint) {
        addError(ClientError.INVALID_ENDPOINT);
      }
      if (_errors.length > 0) {
        _isValid = false;
      }
    };
  
    Object.defineProperties(this, {
  
      /**
       * @member {String} module:Rapid/Client~Client#key
       */
      key: {
        get: function () {
          return _key;
        },
        set: function (key) {
          emptyErrors();
          _key        = key;
          Service.key = _key;
          validate();
        }
      },
  
      /**
       * @member {String} module:Rapid/Client~Client#password
       */
      password: {
        get: function () {
          return _password;
        },
        set: function (password) {
          emptyErrors();
          _password        = password;
          Service.password = _password;
          validate();
        }
      },
  
      /**
       * @member {String} module:Rapid/Client~Client#endpoint
       */
      endpoint: {
        get: function () {
          return _endpoint;
        },
        set: function (endpoint) {
          emptyErrors();
          if (endpoint) {
            switch (endpoint.toLowerCase()) {
              case Client.MODE_SANDBOX:
                _endpoint = Client.ENDPOINT_SANDBOX;
                break;
              case Client.MODE_PRODUCTION:
                _endpoint = Client.ENDPOINT_PRODUCTION;
                break;
              default:
                _endpoint = endpoint;
            }
          } else {
            _endpoint = endpoint;
          }
          Service.baseUrl = _endpoint;
          validate();
        }
      },
  
      /**
       * @member {Boolean} module:Rapid/Client~Client#isValid
       */
      isValid: {
        get: function () {
          return _isValid;
        }
      },
  
      /**
       * @member {Array} module:Rapid/Client~Client#errors
       */
      errors: {
        get: function () {
          return _errors;
        }
      }
    });
  
    this.setCredential(key, password);
    this.endpoint = endpoint;
  }