View Source ExOAPI.Stripe.SDK.PromotionCodes (exoapi_stripe v0.1.1)

Link to this section Summary

Functions

description: <p>Returns a list of your promotion codes.</p>

description: <p>Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing <code>code</code> use <a href="/docs/api/promotion_codes/list">list</a> with the desired <code>code</code>.</p>

description: <p>A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.</p>

description: <p>Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.</p>

Link to this section Types

Link to this type

get_promotion_codes_opts()

View Source
@type get_promotion_codes_opts() ::
  {:starting_after, String.t()}
  | {:limit, String.t()}
  | {:expand, String.t()}
  | {:ending_before, String.t()}
  | {:customer, String.t()}
  | {:created, String.t()}
  | {:coupon, String.t()}
  | {:code, String.t()}
  | {:active, String.t()}
Link to this type

get_promotion_codes_promotion_code_opts()

View Source
@type get_promotion_codes_promotion_code_opts() :: {:expand, String.t()}

Link to this section Functions

Link to this function

get_promotion_codes(client, opts \\ [])

View Source
@spec get_promotion_codes(client :: ExOAPI.Client.t(), [get_promotion_codes_opts()]) ::
  {:ok, any()} | {:error, any()}

description: <p>Returns a list of your promotion codes.</p>

Link to this function

get_promotion_codes_promotion_code(client, promotion_code, opts \\ [])

View Source
@spec get_promotion_codes_promotion_code(
  client :: ExOAPI.Client.t(),
  promotion_code :: String.t(),
  [get_promotion_codes_promotion_code_opts()]
) :: {:ok, any()} | {:error, any()}

description: <p>Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing <code>code</code> use <a href="/docs/api/promotion_codes/list">list</a> with the desired <code>code</code>.</p>

Link to this function

post_promotion_codes(client, body)

View Source
@spec post_promotion_codes(client :: ExOAPI.Client.t(), body :: map()) ::
  {:ok, any()} | {:error, any()}

description: <p>A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.</p>

Link to this function

post_promotion_codes_promotion_code(client, body, promotion_code)

View Source
@spec post_promotion_codes_promotion_code(
  client :: ExOAPI.Client.t(),
  body :: map(),
  promotion_code :: String.t()
) :: {:ok, any()} | {:error, any()}

description: <p>Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.</p>