Stripe. Discount
(stripity_stripe v3.3.2)
View Source
A discount represents the actual application of a coupon or promotion code. It contains information about when the discount began, when it will end, and what it is applied to.
Related guide: Applying discounts to subscriptions
Summary
Types
@type t() :: %Stripe.Discount{ checkout_session: binary() | nil, customer: (binary() | Stripe.Customer.t() | Stripe.DeletedCustomer.t()) | nil, end: integer() | nil, id: binary(), invoice: binary() | nil, invoice_item: binary() | nil, object: binary(), promotion_code: (binary() | Stripe.PromotionCode.t()) | nil, source: term(), start: integer(), subscription: binary() | nil, subscription_item: binary() | nil }
The discount type.
checkout_sessionThe 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.customerThe ID of the customer associated with this discount.endIf the coupon has a duration ofrepeating, the date that this discount will end. If the coupon has a duration ofonceorforever, this attribute will be null.idThe ID of the discount object. Discounts cannot be fetched by ID. Useexpand[]=discountsin API calls to expand discount IDs in an array.invoiceThe invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.invoice_itemThe invoice itemid(or invoice line itemidfor 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.objectString representing the object's type. Objects of the same type share the same value.promotion_codeThe promotion code applied to create this discount.sourcestartDate that the coupon was applied.subscriptionThe subscription that this coupon is applied to, if it is applied to a particular subscription.subscription_itemThe subscription item that this coupon is applied to, if it is applied to a particular subscription item.