示例#1
0
        public async Task <CouponResponse> Post([FromBody] CouponAmountRequest dto)
        {
            dto.CreatorId = base.CurrentUser.UserId;
            CouponService service = new CouponService(dto.SchoolId);

            return(await service.CreateCoupon(dto));
        }
示例#2
0
        public void CreateCoupon()
        {
            var couponCommand = new CouponCreated()
            {
                CouponCode = "TESTCOUPON",
                OwnerID    = 1010,
                CampaignID = 8,
                FromDate   = DateTime.Now
            };
            var response = couponService.CreateCoupon(couponCommand);

            Assert.AreEqual(response.Type, Common.ServiceResponseTypes.Success);
        }