Where to Buy
Helps a user discover which of your venues have a given product in stock.
Where to Buy identifies where an Object_Product is available across your eligible Object_Venue(s).
Object_WhereToBuy is the container object which will include an array of either Object_MerchantProductLinks (if sorted by price) or venues (if sorted by distance).
If a merchant product link is returned, it will include the venue that it is contained in.
If a venue is returned, it will include the merchant product link that matches the criteria provided.
See Preferabli.main().whereToBuy(long product_id, Other_FulfillSort fulfill_sort, Boolean append_nonconforming_results, Boolean lock_to_integration, API_ResultHandler<Object_WhereToBuy> handler) for more information.
Here is an example of how to use Where to Buy:
Preferabli.main().whereToBuy(data, null, null, null, new API_ResultHandler<Object_WhereToBuy>() {
@Override
public void onSuccess(Object_WhereToBuy data) {
// Do what you want with the merchant product link or venue objects returned.
}
@Override
public void onFailure(API_PreferabliException e) {
// Call failed
}
});Updated about 1 year ago
