Safe Haskell | None |
---|---|
Language | Haskell2010 |
StripeAPI.Types.Discount
Description
Contains the types generated from the schema Discount
Synopsis
- data Discount = Discount {
- discountCheckoutSession :: Maybe Text
- discountCoupon :: Coupon
- discountCustomer :: Maybe DiscountCustomer'Variants
- discountEnd :: Maybe Int
- discountId :: Text
- discountInvoice :: Maybe Text
- discountInvoiceItem :: Maybe Text
- discountPromotionCode :: Maybe DiscountPromotionCode'Variants
- discountStart :: Int
- discountSubscription :: Maybe Text
- mkDiscount :: Coupon -> Text -> Int -> Discount
- data DiscountCustomer'Variants
- data DiscountPromotionCode'Variants
Documentation
Defines the object schema located at components.schemas.discount
in the specification.
A discount represents the actual application of a coupon to a particular customer. It contains information about when the discount began and when it will end.
Related guide: Applying Discounts to Subscriptions.
Constructors
Discount | |
Fields
|
data DiscountCustomer'Variants Source #
Defines the oneOf schema located at components.schemas.discount.properties.customer.anyOf
in the specification.
The ID of the customer associated with this discount.
Constructors
DiscountCustomer'Text Text | |
DiscountCustomer'Customer Customer | |
DiscountCustomer'DeletedCustomer DeletedCustomer |
Instances
Eq DiscountCustomer'Variants Source # | |
Defined in StripeAPI.Types.Discount Methods (==) :: DiscountCustomer'Variants -> DiscountCustomer'Variants -> Bool # (/=) :: DiscountCustomer'Variants -> DiscountCustomer'Variants -> Bool # | |
Show DiscountCustomer'Variants Source # | |
Defined in StripeAPI.Types.Discount Methods showsPrec :: Int -> DiscountCustomer'Variants -> ShowS # show :: DiscountCustomer'Variants -> String # showList :: [DiscountCustomer'Variants] -> ShowS # | |
ToJSON DiscountCustomer'Variants Source # | |
Defined in StripeAPI.Types.Discount Methods toJSON :: DiscountCustomer'Variants -> Value # toEncoding :: DiscountCustomer'Variants -> Encoding # toJSONList :: [DiscountCustomer'Variants] -> Value # | |
FromJSON DiscountCustomer'Variants Source # | |
Defined in StripeAPI.Types.Discount Methods parseJSON :: Value -> Parser DiscountCustomer'Variants # parseJSONList :: Value -> Parser [DiscountCustomer'Variants] # |
data DiscountPromotionCode'Variants Source #
Defines the oneOf schema located at components.schemas.discount.properties.promotion_code.anyOf
in the specification.
The promotion code applied to create this discount.
Instances
Eq DiscountPromotionCode'Variants Source # | |
Defined in StripeAPI.Types.Discount | |
Show DiscountPromotionCode'Variants Source # | |
Defined in StripeAPI.Types.Discount Methods showsPrec :: Int -> DiscountPromotionCode'Variants -> ShowS # show :: DiscountPromotionCode'Variants -> String # showList :: [DiscountPromotionCode'Variants] -> ShowS # | |
ToJSON DiscountPromotionCode'Variants Source # | |
Defined in StripeAPI.Types.Discount | |
FromJSON DiscountPromotionCode'Variants Source # | |
Defined in StripeAPI.Types.Discount Methods parseJSON :: Value -> Parser DiscountPromotionCode'Variants # parseJSONList :: Value -> Parser [DiscountPromotionCode'Variants] # |