Search documentation of polar_express

# PolarExpress.Services.ProductsService (polar_express v0.1.5)

Copy Markdown View Source

Products

Products API operations.

## Summary

### Functions

create_product(client, params \\ %{}, opts \\ [])

Create Product

get_product(client, id, params \\ %{}, opts \\ [])

Get Product

list_products(client, params \\ %{}, opts \\ [])

List Products

update_product(client, id, params \\ %{}, opts \\ [])

Update Product

update_product_benefits(client, id, params \\ %{}, opts \\ [])

Update Product Benefits

## Functions

# create_product(client, params \\ %{}, opts \\ [])

    @spec create_product(PolarExpress.Client.t(), map(), keyword()) ::
      {:ok, PolarExpress.Schemas.Product.t()} | {:error, PolarExpress.Error.t()}

Create Product

Create a product.

Scopes: `products:write`

See `PolarExpress.Params.ProductsCreateProductParams` for parameter details.

# get_product(client, id, params \\ %{}, opts \\ [])

    @spec get_product(PolarExpress.Client.t(), String.t(), map(), keyword()) ::
      {:ok, PolarExpress.Schemas.Product.t()} | {:error, PolarExpress.Error.t()}

Get Product

Get a product by ID.

Scopes: `products:read` `products:write`

See `PolarExpress.Params.ProductsGetProductParams` for parameter details.

# list_products(client, params \\ %{}, opts \\ [])

    @spec list_products(PolarExpress.Client.t(), map(), keyword()) ::
      {:ok, PolarExpress.ListObject.t()} | {:error, PolarExpress.Error.t()}

List Products

List products.

Scopes: `products:read` `products:write`

See `PolarExpress.Params.ProductsListProductsParams` for parameter details.

# update_product(client, id, params \\ %{}, opts \\ [])

    @spec update_product(PolarExpress.Client.t(), String.t(), map(), keyword()) ::
      {:ok, PolarExpress.Schemas.Product.t()} | {:error, PolarExpress.Error.t()}

Update Product

Update a product.

Scopes: `products:write`

See `PolarExpress.Params.ProductsUpdateProductParams` for parameter details.

# update_product_benefits(client, id, params \\ %{}, opts \\ [])

    @spec update_product_benefits(PolarExpress.Client.t(), String.t(), map(), keyword()) ::
      {:ok, PolarExpress.Schemas.Product.t()} | {:error, PolarExpress.Error.t()}

Update Product Benefits

Update benefits granted by a product.

Scopes: `products:write`

See `PolarExpress.Params.ProductsUpdateProductBenefitsParams` for parameter details.