Hey Rick,
There's currently no way to know how much a discount code will take off. The reason is that they're calculated after Scripts are applied. For now, the best thing you can do is approximate manually how much it will be worth if it's a FixedAmount or Percentage, but if the discount code applies to a collection that won't really help.
... View more

@Andy
In the API reference, you'll notice that the reject is on CartDiscount classes. You'll have to use something like this
cart = Input.cart
contition_is_met = #magic
if condition_is_met
cart.discount_code.reject(
message: "You don't have access to this discount"
)
end
... View more