public static function setFromDTO(Coupon &$coupon, CouponDTO $couponDTO) { $coupon->setCode($couponDTO->code); $coupon->setFlagFreeShipping($couponDTO->flagFreeShipping); $coupon->setMinOrderValue($couponDTO->minOrderValue); $coupon->setMaxOrderValue($couponDTO->maxOrderValue); $coupon->setCanCombineWithOtherCoupons($couponDTO->canCombineWithOtherCoupons); }