public async Task <CouponResponse> Post([FromBody] CouponAmountRequest dto) { dto.CreatorId = base.CurrentUser.UserId; CouponService service = new CouponService(dto.SchoolId); return(await service.CreateCoupon(dto)); }
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); }