This is not officially documented but you can get good hints by looking at the headers in
/Applications/Glyphs.app/Contents/Frameworks/GlyphsCore.framework/Versions/A/Headers. I usually open the whole folder in my text editor and do a multi-file search for the method or class in question.
In this case the file
NSBezierPath-OAExtensions.h contains the definition (in ObjectiveC):
- (BOOL)intersectionWithLine:(NSPoint *)result lineStart:(NSPoint)lineStart lineEnd:(NSPoint)lineEnd;
That suggests you need three
NSPoints as parameters but I have not tested it. Does it work for you?