PromotionCode
A Promotion Code represents a customer-redeemable code for an underlying promotion. You can create multiple codes for a single promotion.
If you enable promotion codes in your customer portal configuration, then customers can redeem a code themselves when updating a subscription in the portal. Customers can also view the currently active promotion codes and coupons on each of their subscriptions in the portal.
Summary
Functions
Create a promotion code
List all promotion codes
Retrieve a promotion code
Update a promotion code
Functions
@spec create(Stripe.Client.t(), map(), keyword()) :: {:ok, term()} | {:error, Stripe.Error.t()}
Create a promotion code
A promotion code points to an underlying promotion. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.
@spec list(Stripe.Client.t(), map(), keyword()) :: {:ok, term()} | {:error, Stripe.Error.t()}
List all promotion codes
Returns a list of your promotion codes.
@spec retrieve(Stripe.Client.t(), String.t(), map(), keyword()) :: {:ok, term()} | {:error, Stripe.Error.t()}
Retrieve a promotion code
Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use list with the desired code.
@spec update(Stripe.Client.t(), String.t(), map(), keyword()) :: {:ok, term()} | {:error, Stripe.Error.t()}
Update a promotion code
Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.