purelledhand/class101-challenge

Cart모델 내 쿠폰 할인 메서드 추가

Closed this issue · 0 comments

1.getAvailableCouponItems

  1. discountPrice(coupon)

Switch Coupon.type
Rate: return number(getacitems.reduce(item*rate))
Amount: return
Getacitems.reduce sum, item < amount ? 전자 : amount

  1. PaymentPrice()
    totalprice - discountprice