View Source ExCatalog.Product (ex_catalog v1.5.6)

Link to this section Summary

Link to this section Functions

Link to this function

build_slug(sources, changeset)

View Source
Link to this function

force_generate_slug(changeset)

View Source
Link to this function

get_sources(changeset, opts)

View Source
Link to this function

maybe_generate_slug(changeset)

View Source
Link to this function

new(params \\ %{}, struct \\ %ExCatalog.Product{})

View Source

Create a New Product

examples

Examples

iex> price = Money.new(:USD, 100)
iex> product = %{sku: "12345", price: price, title: "test product", sub_title: "test product", description: "test product"}
iex> ExCatalog.Product.new(product)
Link to this function

unique_constraint(changeset, opts \\ [])

View Source