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

Link to this section Summary

Functions

description: <p>Delete a SKU. Deleting a SKU is only possible until it has been used in an order.</p>

description: <p>Returns a list of your SKUs. The SKUs are returned sorted by creation date, with the most recently created SKUs appearing first.</p>

description: <p>Retrieves the details of an existing SKU. Supply the unique SKU identifier from either a SKU creation request or from the product, and Stripe will return the corresponding SKU information.</p>

description: <p>Creates a new SKU associated with a product.</p>

description: <p>Updates the specific SKU by setting the values of the parameters passed. Any parameters not provided will be left unchanged.</p>

Link to this section Types

@type get_skus_id_opts() :: {:expand, String.t()}
@type get_skus_opts() ::
  {:starting_after, String.t()}
  | {:product, String.t()}
  | {:limit, String.t()}
  | {:in_stock, String.t()}
  | {:ids, String.t()}
  | {:expand, String.t()}
  | {:ending_before, String.t()}
  | {:attributes, String.t()}
  | {:active, String.t()}

Link to this section Functions

Link to this function

delete_skus_id(client, body, id)

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

description: <p>Delete a SKU. Deleting a SKU is only possible until it has been used in an order.</p>

Link to this function

get_skus(client, opts \\ [])

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

description: <p>Returns a list of your SKUs. The SKUs are returned sorted by creation date, with the most recently created SKUs appearing first.</p>

Link to this function

get_skus_id(client, id, opts \\ [])

View Source
@spec get_skus_id(client :: ExOAPI.Client.t(), id :: String.t(), [get_skus_id_opts()]) ::
  {:ok, any()} | {:error, any()}

description: <p>Retrieves the details of an existing SKU. Supply the unique SKU identifier from either a SKU creation request or from the product, and Stripe will return the corresponding SKU information.</p>

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

description: <p>Creates a new SKU associated with a product.</p>

Link to this function

post_skus_id(client, body, id)

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

description: <p>Updates the specific SKU by setting the values of the parameters passed. Any parameters not provided will be left unchanged.</p>

Note that a SKU’s attributes are not editable. Instead, you would need to deactivate the existing SKU and create a new one with the new attribute values.