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

Link to this section Summary

Functions

description: <p>Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with <code>type=good</code> is only possible if it has no SKUs associated with it.</p>

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

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

description: <p>Search for products you’ve previously created using Stripe’s <a href="/docs/search#search-query-language">Search Query Language</a>. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.</p>

description: <p>Creates a new product object.</p>

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

Link to this section Types

Link to this type

get_products_id_opts()

View Source
@type get_products_id_opts() :: {:expand, String.t()}
@type get_products_opts() ::
  {:url, String.t()}
  | {:starting_after, String.t()}
  | {:shippable, String.t()}
  | {:limit, String.t()}
  | {:ids, String.t()}
  | {:expand, String.t()}
  | {:ending_before, String.t()}
  | {:created, String.t()}
  | {:active, String.t()}
Link to this type

get_products_search_opts()

View Source
@type get_products_search_opts() ::
  {:page, String.t()} | {:limit, String.t()} | {:expand, String.t()}

Link to this section Functions

Link to this function

delete_products_id(client, body, id)

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

description: <p>Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with <code>type=good</code> is only possible if it has no SKUs associated with it.</p>

Link to this function

get_products(client, opts \\ [])

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

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

Link to this function

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

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

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

Link to this function

get_products_search(client, query, opts \\ [])

View Source
@spec get_products_search(
  client :: ExOAPI.Client.t(),
  query :: String.t(),
  [get_products_search_opts()]
) :: {:ok, any()} | {:error, any()}

description: <p>Search for products you’ve previously created using Stripe’s <a href="/docs/search#search-query-language">Search Query Language</a>. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.</p>

Link to this function

post_products(client, body)

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

description: <p>Creates a new product object.</p>

Link to this function

post_products_id(client, body, id)

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

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