stripeapi-2.0.0.1: Stripe-Library
Safe HaskellNone
LanguageHaskell2010

StripeAPI.Types.Discount

Description

Contains the types generated from the schema Discount

Synopsis

Documentation

data Discount Source #

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

  • discountCheckoutSession :: Maybe Text

    checkout_session: The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode.

    Constraints:

    • Maximum length of 5000
  • discountCoupon :: Coupon

    coupon: 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.

  • discountCustomer :: Maybe DiscountCustomer'Variants

    customer: The ID of the customer associated with this discount.

  • discountEnd :: Maybe Int

    end: If the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null.

  • discountId :: Text

    id: The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array.

    Constraints:

    • Maximum length of 5000
  • discountInvoice :: Maybe Text

    invoice: The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.

    Constraints:

    • Maximum length of 5000
  • discountInvoiceItem :: Maybe Text

    invoice_item: The invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item.

    Constraints:

    • Maximum length of 5000
  • discountPromotionCode :: Maybe DiscountPromotionCode'Variants

    promotion_code: The promotion code applied to create this discount.

  • discountStart :: Int

    start: Date that the coupon was applied.

  • discountSubscription :: Maybe Text

    subscription: The subscription that this coupon is applied to, if it is applied to a particular subscription.

    Constraints:

    • Maximum length of 5000

Instances

Instances details
Eq Discount Source # 
Instance details

Defined in StripeAPI.Types.Discount

Show Discount Source # 
Instance details

Defined in StripeAPI.Types.Discount

ToJSON Discount Source # 
Instance details

Defined in StripeAPI.Types.Discount

FromJSON Discount Source # 
Instance details

Defined in StripeAPI.Types.Discount

mkDiscount Source #

Create a new Discount with all required fields.