PhoenixKitEcommerce.Shopify.ProductDiff.Change (PhoenixKitEcommerce v0.3.0)

Copy Markdown View Source

One local product's field-by-field diff against its matched Shopify product. changes only contains fields that actually differ, keyed by field atom, each holding %{current:, incoming:}. price_extreme? is true only when :price is in changes and the current/incoming ratio exceeds 3x.

Summary

Types

t()

@type t() :: %PhoenixKitEcommerce.Shopify.ProductDiff.Change{
  changes: %{required(atom()) => %{current: term(), incoming: term()}},
  handle: String.t(),
  price_extreme?: boolean(),
  product_uuid: String.t(),
  title: String.t() | nil
}