We provide web services that'll return informations about a product like this (simplified)
<product>
<id>123</id>
<name>Mobil-home</name>
<pricing>
<price>12</price>
<adults>2</adults>
</pricing>
<pricing>
<price>15</price>
<adults>3</adults>
</pricing>
</product>
Our partner says "Our problem is that in our system we can have only 1 adult count per product". This partner is working with a huge system, and they say that it's a big problem and they can't change anything about it in their side.
So what did we decide ? to explode our results like this
<product>
<id>123</id>
<virtualId>123@2</virtualId>
<name>Mobil-home</name>
<pricing>
<price>12</price>
<adults>2</adults>
</pricing>
</product>
<product>
<id>123</id>
<virtulId>123@3</virtualId>
<name>Mobil-home</name>
<pricing>
<price>15</price>
<adults>3</adults>
</pricing>
</product>
So we created a "virtualId" that concatenate the id and the adults with an @. Technically it's a mess, but we do software for a business, the target is not to make clean software, but to make money.
My solutions are :
I try to make a concept out of it : "In some call I have to call a service class that'll explode our results", and then add this functionality to my web service (even if I'm sure we'll use this only in the case of this partner).
I do 3 dirty lines of code with an ugly (if user == "thispartner")
I add a layer between my partner and my web service that'll do the ugly job
I'm stubborn and I say to my boss "We can't work with them, our systems are not compatible", and then I go to the Pole Emploi.
How do you deal in these cases ?