Skip to content

Instantly share code, notes, and snippets.

@cddr
Created January 3, 2014 13:12
Show Gist options
  • Save cddr/8237666 to your computer and use it in GitHub Desktop.
Save cddr/8237666 to your computer and use it in GitHub Desktop.
ad_details question
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