View Source ExOAPI.Stripe.Schemas.Discount (exoapi_stripe v0.1.4)
description: 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.
:checkout_session :: :string
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.
:coupon :: ExOAPI.Stripe.Schemas.Coupon
:customer :: ExOAPI.Stripe.Schemas.DeletedCustomer | ExOAPI.Stripe.Schemas.Customer | :string
The ID of the customer associated with this discount.
:end :: :integer
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.
:id :: :string
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.
:invoice :: ExOAPI.Stripe.Schemas.Invoice
The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.
:invoice_item :: :string
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.
:object :: :string
String representing the object's type. Objects of the same type share the same value.
:promotion_code :: ExOAPI.Stripe.Schemas.PromotionCode | :string
The promotion code applied to create this discount.
:start :: :integer
Date that the coupon was applied.
:subscription :: ExOAPI.Stripe.Schemas.Subscription
The subscription that this coupon is applied to, if it is applied to a particular subscription.
Link to this section Summary
Link to this section Types
@type params() :: map()
@type t() :: %ExOAPI.Stripe.Schemas.Discount{ checkout_session: String.t() | nil, coupon: ExOAPI.Stripe.Schemas.Coupon.t() | nil, customer: ExOAPI.EctoTypes.AnyOf.t() | nil, end: integer() | nil, id: String.t() | nil, invoice: String.t() | nil, invoice_item: String.t() | nil, object: :discount | nil, promotion_code: ExOAPI.EctoTypes.AnyOf.t() | nil, start: integer() | nil, subscription: String.t() | nil }
Link to this section Functions
@spec changeset(t(), params()) :: Ecto.Changeset.t()