Skip to content

Releases: mbramson/catalog_api

v.0.0.16

21 Jul 01:44
Compare
Choose a tag to compare

Relaxes the Jason version requirement to be "~> 1.1" instead of "~> 1.1.2".

v0.0.15

18 Dec 01:58
a53c1fc
Compare
Choose a tag to compare
  • #18
    • Switches the JSON encoder to Jason from Poison.
    • Derives the Jason.Encoder protocol for the structs returned by CatalogApi.

v0.0.14

30 Aug 01:02
Compare
Choose a tag to compare
  • Add Explicit %CatalogApi.Order{} struct when returning orders for the CatalogApi.cart_order_place/3 function (#17)

v0.0.13

03 Jun 19:27
Compare
Choose a tag to compare
  • Improve CatalogApi.cart_empty/2 to return the description that is returned by CatalogAPI, rather than the unparsed JSON response (#15).
  • Add credo to enforce code style in CI (#16)

v0.0.12

28 May 18:56
Compare
Choose a tag to compare
  • Improve CatalogApi.cart_remove_item/4 (#14)

v0.0.11

22 May 23:33
Compare
Choose a tag to compare
  • Properly format item categories (#12)
    • Rather than returning item categories in the format that catalog_api returns (e.g. %{"integer" => [1, 2, 3]}, we simply return the much more ergonomic value of [1, 2, 3]
  • Run mix format on everything (#13)
    • Update CatalogApi.list_available_catalogs/0 to parse the response json.

v0.0.10

19 May 14:12
Compare
Choose a tag to compare
  • Flesh out the CatalogApi.category_breakdown/2 function which hits the category_breakdown CatalogAPI endpoint. (#9)
    • Adds the CatalogApi.Category module which defines the %Category{} struct representing categories returned by various endpoints including CatalogApi.category_breakdown/2.
  • Adds the description key to items returned by the CatalogApi.search_catalog/2 and CatalogApi.view_item/2 functions. (#10)
  • Adds the address to the CatalogApi.cart_view/3 function return so that consumers can determine which address applies to the given cart before checkout. (#11)
    • Adds functions to help parse Addresses from other responses.

v0.0.9

14 Apr 16:56
Compare
Choose a tag to compare
  • 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.

v0.0.7

04 Mar 18:02
cc5f8c9
Compare
Choose a tag to compare
  • Improves the format of error tuples generated via address validation so that they more closely match the format of changeset errors generated by Ecto.Changeset.traverse_errors/2. This means that consuming applications have to do less data manipulation to get address validation errors to match the format of errors from changesets.

v0.0.6

03 Mar 19:27
Compare
Choose a tag to compare
  • Adds the CatalogApi.CartItem{} struct for handling methods which return items in a user's cart. These items contain some different fields than the existing CatalogApi.Item{} struct. For now the only function that uses this struct is CatalogApi.cart_view/2. (#2)