Beispiel #1
0
            /// <summary>
            /// Gets the active prices of the specified products.
            /// </summary>
            /// <param name="recordIds">Products' record IDs.</param>
            /// <param name="catalogId">The catalog ID.</param>
            /// <param name="affiliationLoyaltyTierIds">Affiliation Loyalty Tier IDs.</param>
            /// <param name="queryResultSettings">The query result settings.</param>
            /// <returns>The prices.</returns>
            public async Task <ActionResult> GetActivePrices(IEnumerable <long> recordIds, long?catalogId, IEnumerable <long> affiliationLoyaltyTierIds, QueryResultSettings queryResultSettings)
            {
                if (queryResultSettings == null)
                {
                    throw new ArgumentNullException(nameof(queryResultSettings));
                }

                EcommerceContext           ecommerceContext         = ServiceUtilities.GetEcommerceContext(this.HttpContext);
                ProductOperationsHandler   productOperationsHandler = new ProductOperationsHandler(ecommerceContext);
                PagedResult <ProductPrice> products = await productOperationsHandler.GetActivePrices(recordIds, catalogId, affiliationLoyaltyTierIds, queryResultSettings);

                return(this.Json(products.Results));
            }