Safe Haskell | None |
---|---|
Language | Haskell2010 |
Contains the types generated from the schema Coupon
Synopsis
- data Coupon = Coupon {
- couponAmountOff :: Maybe Int
- couponAppliesTo :: Maybe CouponAppliesTo
- couponCreated :: Int
- couponCurrency :: Maybe Text
- couponDuration :: CouponDuration'
- couponDurationInMonths :: Maybe Int
- couponId :: Text
- couponLivemode :: Bool
- couponMaxRedemptions :: Maybe Int
- couponMetadata :: Maybe Object
- couponName :: Maybe Text
- couponPercentOff :: Maybe Double
- couponRedeemBy :: Maybe Int
- couponTimesRedeemed :: Int
- couponValid :: Bool
- mkCoupon :: Int -> CouponDuration' -> Text -> Bool -> Int -> Bool -> Coupon
- data CouponDuration'
Documentation
Defines the object schema located at components.schemas.coupon
in the specification.
A coupon contains information about a percent-off or amount-off discount you might want to apply to a customer. Coupons may be applied to invoices or orders. Coupons do not work with conventional one-off charges.
Coupon | |
|
Create a new Coupon
with all required fields.
data CouponDuration' Source #
Defines the enum schema located at components.schemas.coupon.properties.duration
in the specification.
One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount.
CouponDuration'Other Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
CouponDuration'Typed Text | This constructor can be used to send values to the server which are not present in the specification yet. |
CouponDuration'EnumForever | Represents the JSON value |
CouponDuration'EnumOnce | Represents the JSON value |
CouponDuration'EnumRepeating | Represents the JSON value |
Instances
Eq CouponDuration' Source # | |
Defined in StripeAPI.Types.Coupon (==) :: CouponDuration' -> CouponDuration' -> Bool # (/=) :: CouponDuration' -> CouponDuration' -> Bool # | |
Show CouponDuration' Source # | |
Defined in StripeAPI.Types.Coupon showsPrec :: Int -> CouponDuration' -> ShowS # show :: CouponDuration' -> String # showList :: [CouponDuration'] -> ShowS # | |
ToJSON CouponDuration' Source # | |
Defined in StripeAPI.Types.Coupon toJSON :: CouponDuration' -> Value # toEncoding :: CouponDuration' -> Encoding # toJSONList :: [CouponDuration'] -> Value # toEncodingList :: [CouponDuration'] -> Encoding # | |
FromJSON CouponDuration' Source # | |
Defined in StripeAPI.Types.Coupon parseJSON :: Value -> Parser CouponDuration' # parseJSONList :: Value -> Parser [CouponDuration'] # |