| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
StripeAPI.Types.PromotionCode
Description
Contains the types generated from the schema PromotionCode
Synopsis
- data PromotionCode = PromotionCode {
- promotionCodeActive :: Bool
- promotionCodeCode :: Text
- promotionCodeCoupon :: Coupon
- promotionCodeCreated :: Int
- promotionCodeCustomer :: Maybe PromotionCodeCustomer'Variants
- promotionCodeExpiresAt :: Maybe Int
- promotionCodeId :: Text
- promotionCodeLivemode :: Bool
- promotionCodeMaxRedemptions :: Maybe Int
- promotionCodeMetadata :: Maybe Object
- promotionCodeRestrictions :: PromotionCodesResourceRestrictions
- promotionCodeTimesRedeemed :: Int
- mkPromotionCode :: Bool -> Text -> Coupon -> Int -> Text -> Bool -> PromotionCodesResourceRestrictions -> Int -> PromotionCode
- data PromotionCodeCustomer'Variants
Documentation
data PromotionCode Source #
Defines the object schema located at components.schemas.promotion_code in the specification.
A Promotion Code represents a customer-redeemable code for a coupon. It can be used to create multiple codes for a single coupon.
Constructors
| PromotionCode | |
Fields
| |
Instances
| Eq PromotionCode Source # | |
Defined in StripeAPI.Types.PromotionCode Methods (==) :: PromotionCode -> PromotionCode -> Bool # (/=) :: PromotionCode -> PromotionCode -> Bool # | |
| Show PromotionCode Source # | |
Defined in StripeAPI.Types.PromotionCode Methods showsPrec :: Int -> PromotionCode -> ShowS # show :: PromotionCode -> String # showList :: [PromotionCode] -> ShowS # | |
| ToJSON PromotionCode Source # | |
Defined in StripeAPI.Types.PromotionCode Methods toJSON :: PromotionCode -> Value # toEncoding :: PromotionCode -> Encoding # toJSONList :: [PromotionCode] -> Value # toEncodingList :: [PromotionCode] -> Encoding # | |
| FromJSON PromotionCode Source # | |
Defined in StripeAPI.Types.PromotionCode Methods parseJSON :: Value -> Parser PromotionCode # parseJSONList :: Value -> Parser [PromotionCode] # | |
Arguments
| :: Bool | |
| -> Text | |
| -> Coupon | |
| -> Int | |
| -> Text | |
| -> Bool | |
| -> PromotionCodesResourceRestrictions | |
| -> Int | |
| -> PromotionCode |
Create a new PromotionCode with all required fields.
data PromotionCodeCustomer'Variants Source #
Defines the oneOf schema located at components.schemas.promotion_code.properties.customer.anyOf in the specification.
The customer that this promotion code can be used by.
Constructors
| PromotionCodeCustomer'Text Text | |
| PromotionCodeCustomer'Customer Customer | |
| PromotionCodeCustomer'DeletedCustomer DeletedCustomer |
Instances
| Eq PromotionCodeCustomer'Variants Source # | |
Defined in StripeAPI.Types.PromotionCode | |
| Show PromotionCodeCustomer'Variants Source # | |
Defined in StripeAPI.Types.PromotionCode Methods showsPrec :: Int -> PromotionCodeCustomer'Variants -> ShowS # show :: PromotionCodeCustomer'Variants -> String # showList :: [PromotionCodeCustomer'Variants] -> ShowS # | |
| ToJSON PromotionCodeCustomer'Variants Source # | |
Defined in StripeAPI.Types.PromotionCode | |
| FromJSON PromotionCodeCustomer'Variants Source # | |
Defined in StripeAPI.Types.PromotionCode Methods parseJSON :: Value -> Parser PromotionCodeCustomer'Variants # parseJSONList :: Value -> Parser [PromotionCodeCustomer'Variants] # | |