My API prototype is the following:
I have third party API object named ZResponseHandler
which has method
printZ(z:Z)
no I have the following:
case class X
case class Y
case class Z(x:X,y:Y)
now when I use my API calling printZ method with new z instance it works OK.
ZResponseHandler.printZ(new Z(x,y))
but I would like to create something like this:
implicit def convertXYtoZ(x:X,y:Y):Z = new Z(x,y)
ZResponseHandler.printZ(x,y)
this code gives me compilation error - too many arguments for method printZ:
is there any way to make any implicit class which will accept printZ(x,y)?