View Source BasicECommerce.Product (Basic e-commerce v0.1.0)

Defines an product.

This module defines a BasicECommerce.Product struct describing a product.

fields

Fields

  • sku - the unique SKU (Stock Keeping Unit) identifying the product
  • name - the human-friendly name of the product
  • description - a longer description of the product
  • unit_price_amount - the unit price of the product, in cents

Link to this section Summary

Types

t()

(This type is managed by TypeCheck, which allows checking values against the type at runtime.)

Link to this section Types

@type t() :: %BasicECommerce.Product{
  description: String.t(),
  name: String.t(),
  sku: atom(),
  unit_price_amount: integer()
}

(This type is managed by TypeCheck, which allows checking values against the type at runtime.)

Full definition:

t :: %BasicECommerce.Product{
  sku: atom(),
  name: String.t(),
  description: String.t(),
  unit_price_amount: integer()
}