/// <summary>
            /// Fetch the superset of trade agreements which could apply to all of these items and customer for the given date.
            /// </summary>
            /// <param name="itemIds">The item Ids to fetch for agreements for.</param>
            /// <param name="priceGroups">The price groups (probably channel) to query by.</param>
            /// <param name="customerAccount">Optional. Customer account number to search by.</param>
            /// <param name="minActiveDate">The earliest inclusive active date to search by. Must be less than or equal to maxActiveDate.</param>
            /// <param name="maxActiveDate">The latest inclusive active date to search by. Must be greater than or equal to minActiveDate.</param>
            /// <param name="currencyCode">Currency code to filter by.</param>
            /// <param name="settings">The query result settings.</param>
            /// <returns>Collection of trade agreements which may be applied to the given items of type ReadOnlyCollection&lt;TradeAgreement&gt;.</returns>
            public object ReadPriceTradeAgreements(
                object itemIds,
                object priceGroups,
                string customerAccount,
                DateTimeOffset minActiveDate,
                DateTimeOffset maxActiveDate,
                string currencyCode,
                QueryResultSettings settings)
            {
                ISet <string> itemIdSet     = itemIds as ISet <string>;
                ISet <string> priceGroupSet = priceGroups as ISet <string>;

                using (SimpleProfiler profiler = new SimpleProfiler("ReadPriceTradeAgreements", 1))
                {
                    var dataRequest = new ReadPriceTradeAgreementsDataRequest(
                        itemIdSet,
                        priceGroupSet,
                        customerAccount,
                        minActiveDate,
                        maxActiveDate,
                        currencyCode);
                    dataRequest.QueryResultSettings = settings;
                    return(this.ExecuteDataService <TradeAgreement>(dataRequest));
                }
            }
            private EntityDataServiceResponse <TradeAgreement> ReadPriceTradeAgreements(ReadPriceTradeAgreementsDataRequest request)
            {
                var pricingSqlDatamaanger = this.GetDataManagerInstance(request.RequestContext);

                var retailPriceTradeAgreements = pricingSqlDatamaanger.ReadPriceTradeAgreements(
                    request.ItemId,
                    request.PriceGroups as ISet <string>,
                    request.CustomerAccount,
                    request.MinActiveDate,
                    request.MaxActiveDate,
                    request.CurrencyCode);

                return(new EntityDataServiceResponse <TradeAgreement>(retailPriceTradeAgreements));
            }