def validate_credentials!
      fail(
        DeskApi::Error::ConfigurationError, 'Invalid credentials: ' \
        'Either username/password or OAuth credentials must be specified.'
      ) unless credentials?

      validate_oauth! if oauth.values.all?
      validate_basic_auth! if basic_auth.values.all?
    end
def validate_credentials!
      fail(
        DeskApi::Error::ConfigurationError, 'Invalid credentials: ' \
        'Either username/password or OAuth credentials must be specified.'
      ) unless credentials?

      validate_oauth! if oauth.values.all?
      validate_basic_auth! if basic_auth.values.all?
    end
Raises an error if credentials are not set or of
 the wrong type.

 @raise [DeskApi::Error::ConfigurationError]