Skip to content

v0.0.9

Compare
Choose a tag to compare
@mbramson mbramson released this 14 Apr 16:56
· 52 commits to master since this release
  • Fix CatalogApi.cart_view response type when viewing empty carts (#5).
    • In the event that an empty cart is viewed, we now return {:ok, %{items: [], status: :unavailable_cart_status}} instead of {:error, :unparseable_catalog_api_items}. This is much easier to handle and actually identifies what has happened.
  • Adds a RuntimeError when the catalog_api secret key is not set in configuration (#6).
    • This is a much better user experience than attempting to make a call and failing deep in erlang's :crypto module.
  • Make the CatalogApi.cart_set_address function properly when given a %CatalogApi.Address{} struct as the documentation states is possible (#7).
  • Adds a new error return type to the CatalogApi.cart_order_place function when supplying the cart_version parameter in the event that the supplied cart_version parameter does not match the cart version in CatalogApi (#8)
    • Returns an error tuple of the format {:error, :stale_cart_version} rather than than error tuple containing a %CatalogApi.Fault{} struct. This brings the responsibility of identifying this common functionality into catalog_api.