Example #1
0
 public PromotionCommand(PromotionModel model, PromotionAction action)
 {
     this.PromotionModel   = model;
     this.promotionAction  = action;
     this.promotionService = new PromotionService();
     this.productService   = new ProductService();
 }
        private MPPromotionAction ConvertToMpPromotionAction(PromotionAction action)
        {
            switch (action)
            {
            case PromotionAction.Click:
                return(MPPromotionAction.Click);

            case PromotionAction.View:
            default:
                return(MPPromotionAction.View);
            }
        }
Example #3
0
        internal static string GetAction(PromotionAction action)
        {
            switch (action)
            {
            case PromotionAction.Click:
                return("click");

            case PromotionAction.View:
                return("view");

            default:
                throw new NotImplementedException();
            }
        }
Example #4
0
        internal string ConvertToMpPromotionAction(PromotionAction action)
        {
            switch (action)
            {
            case PromotionAction.Click:
                return("click");

            case PromotionAction.View:
                return("view");

            default:
                return(null);
            }
        }
 public CommerceEvent(PromotionAction newPromotionAction, Promotion[] newPromotions)
 {
     this.PromotionAction = newPromotionAction;
     this.Promotions      = newPromotions;
 }
 /// <summary>
 ///     Adds an action associated with the promotions in a given hit.
 /// </summary>
 /// <param name="action">The action associated with the hit.</param>
 /// <returns>The builder object that you can use to chain calls.</returns>
 public HitBuilder SetPromotionAction(PromotionAction action)
 {
     return(new HitBuilder(_lineage, new Dictionary <string, string> {
         { "pa", Promotion.GetAction(action) }
     }));
 }