Closed MarianoTucat closed 7 years ago
Hey @MarianoTucat, thanks for reporting.
Please give us an indicator of how you're using the SDK. We don't support PriceDetails model in our base Product model currently. Is this a custom implementation?
Sorry, my bad, I did added priceDetail
field to Product
class to be able to get that info returned from the API that was being lost and required extra calls.
I have forked this repo a while ago, made that change and forgot about it.
Somehow, this issue appeared after I rebased the fork from 0.5.2 to 0.6.0, so, is it possible that something changed in the response of the API and started getting null
for minimum values for PriceDetail
? or maybe it was just a coincidence. Anyway, it is either an API issue or an expected value, but not an issue of this SDK implementation, sorry again about this.
Hey @MarianoTucat,
When the SDK updated to 0.6.0 we moved all our endpoints to hit API version 1.2, which deprecated price_detail
. API 1.2 added support for upfront pricing, which for all upfront pricing products removed the PriceDetail
as an object. You're probably getting a product that supports upfront pricing and so it no longer has the PriceDetail
object you were getting in 0.5.2, which hit API 1.0.
ok, good to know, thanks for the info @itstexter !
I'm getting the following exception:
com.squareup.moshi.JsonDataException: Expected a double but was NULL at path $.products[4].price_details.minimum
When doing a GET on, for example, https://sandbox-api.uber.com/v1.2/products?latitude=41.87811&longitude=-87.6298 and also in prod url https://api.uber.com/v1.2/products\?latitude\=41.87811\&longitude\=-87.6298
Seems to be a parsing error,
PriceDetail
hasminimum
field asfloat
and the returned JSON contains anull
value:This is using
0.6.0
version of the SDK