PriceFilter returning wrong pricing



I am using Commerce 12.15 and creating a price filter to pass to GetPrices method of PriceServiceDatabase class which implements IPriceService. 

Below is the price filter I create, so now I am expecting that this will give me prices which have Currency: USD, CustomerPricing: AllCustomers and no price code and where the minimum quantity is 1.

PriceFilter filter = new PriceFilter()
Currencies = new Currency[] { new Currency("USD") },
CustomerPricing = new CustomerPricing[]
new CustomerPricing(CustomerPricing.PriceType.AllCustomers, string.Empty)
Quantity = 1

But upon passing this to GetPrices, it gives me back a price whose Minimum Quantity is 0. Also, this happens when I dont have a price code.

Below is a screen shot for reference:

I have the filter and the prices returned back from the call. 

Mar 22, 2019 0:35

I think you understand thing in reverse. Quantity is to make sure you will not get prices for quantity more than that - that's why it is not named MinQuantity (yeah I know Quantity is not that clearer). If you want to get prices for min quantity = 1 then you will have to filter it yourself. 

Mar 22, 2019 10:41

Thank you @Quan!

Mar 22, 2019 15:36