Example #1
0
        /// <summary>
        /// The method returns all the payment levels that have brandId and currencyCode as the passed ones
        /// </summary>
        /// <param name="brandId"></param>
        /// <param name="currencyCode"></param>
        /// <returns>Pairs of payment level ID and payment level Name</returns>
        public string GetPaymentLevels(Guid brandId, string currencyCode)
        {
            var paymentLevels = _paymentQueries.GetPaymentLevelsByBrandAndCurrency(brandId, currencyCode);

            return(SerializeJson(new
            {
                PaymentLevels = paymentLevels.Select(x => new { id = x.Id, name = x.Name })
            }));
        }
        public IHttpActionResult GetPaymentLevels(Guid brandId, string currency)
        {
            var paymentLevels = _paymentLevelQueries.GetPaymentLevelsByBrandAndCurrency(brandId, currency)
                                .Select(l => new { l.Id, l.Name });

            return(Ok(new
            {
                PaymentLevels = paymentLevels
            }));
        }