Created
January 3, 2014 13:12
-
-
Save cddr/8237666 to your computer and use it in GitHub Desktop.
ad_details question
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
So if we have the following line item... | |
line_item | |
ad_distribution{:price_per_unit = 20} | |
buy_item{:id = 1} | |
buy_item{:id = 2, | |
:price_per_unit = 40} | |
I think the first case is simple. Seems we should return.... | |
``` | |
GET /ad_details/1.json | |
{ | |
"buy_item": { | |
"price_per_unit": 20, | |
"ad_distribution": { | |
"price_per_unit": 20 | |
} | |
} | |
} | |
``` | |
But for | |
GET /ad_details/2.json | |
should we return this? | |
``` | |
{ | |
"buy_item": { | |
"price_per_unit": 40, | |
"ad_distribution": { | |
"price_per_unit": 40 | |
} | |
} | |
} | |
``` | |
or this | |
``` | |
{ | |
"buy_item": { | |
"price_per_unit": 40, | |
"ad_distribution": { | |
"price_per_unit": 20 | |
} | |
} | |
} | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment