Web.Stripe.Coupon
- data Coupon = Coupon {}
- newtype CpnId = CpnId {}
- data CpnDuration
- newtype CpnPercentOff = CpnPercentOff {}
- newtype CpnMaxRedeems = CpnMaxRedeems {}
- newtype CpnRedeemBy = CpnRedeemBy {
- unCpnRedeemBy :: Int
- createCoupon :: MonadIO m => Coupon -> Maybe CpnMaxRedeems -> Maybe CpnRedeemBy -> StripeT m ()
- getCoupon :: MonadIO m => CpnId -> StripeT m Coupon
- getCoupons :: MonadIO m => Maybe Count -> Maybe Offset -> StripeT m [Coupon]
- delCoupon :: MonadIO m => Coupon -> StripeT m Bool
- delCouponById :: MonadIO m => CpnId -> StripeT m Bool
- newtype Count = Count {}
- newtype Offset = Offset {}
- data SConfig = SConfig {}
- newtype StripeT m a = StripeT (StateT SConfig (ErrorT SFailure m) a)
- runStripeT :: MonadIO m => SConfig -> StripeT m a -> m (Either SFailure a)
Documentation
Represents a coupon in the Stripe system.
Constructors
| Coupon | |
Fields | |
Represents the identifier for a given Coupon in the Stripe system.
data CpnDuration Source
Represents the duration of a coupon. If an interval identifier is not
known, UnknownDuration is used to carry the original identifier supplied
by Stripe.
Constructors
| Once | |
| Repeating Int | Field specifies how long (months) discount is in effect |
| Forever | |
| UnknownDuration String |
Instances
newtype CpnPercentOff Source
Represents the percent off that is applied by a coupon. This must be between 1 and 100.
Constructors
| CpnPercentOff | |
Fields | |
Instances
newtype CpnMaxRedeems Source
A positive number representing the maximum number of times that a coupon can be redeemed.
Constructors
| CpnMaxRedeems | |
Fields | |
Instances
newtype CpnRedeemBy Source
UTC timestamp specifying the last time at which the coupon can be redeemed.
Constructors
| CpnRedeemBy | |
Fields
| |
Instances
createCoupon :: MonadIO m => Coupon -> Maybe CpnMaxRedeems -> Maybe CpnRedeemBy -> StripeT m ()Source
Creates a Coupon in the Stripe system.
delCoupon :: MonadIO m => Coupon -> StripeT m BoolSource
Deletes a Coupon if it exists. If it does not, an
InvalidRequestError will be thrown indicating this.
A maximum number of objects that the Stripe API will return. This value should be between 1 and 100, inclusive.
A positive integer that is an offset into the array of objects returned by the Stripe API.
Configuration for the StripeT monad transformer.
Defines the monad transformer under which all Stripe REST API resource calls take place.