CatalogApi.CartItem (CatalogApi v0.0.17) View Source
Defines the CatalogApi.CartItem struct and functions which are responsible for parsing items in a user's cart from CatalogApi responses.
Link to this section Summary
Functions
Converts JSON representing an item in a user's cart and returns a %CatalogApi.CartItem{} struct.
Extracts %CatalogApi.CartItem{} struct(s) from a raw parsed json response.
Link to this section Types
Specs
t() :: %CatalogApi.CartItem{
cart_price: term(),
catalog_item_id: term(),
catalog_points: term(),
catalog_price: term(),
currency: term(),
error: term(),
image_uri: term(),
is_available: term(),
is_valid: term(),
name: term(),
points: term(),
quantity: term(),
retail_price: term(),
shipping_estimate: term()
}
Link to this section Functions
Specs
Converts JSON representing an item in a user's cart and returns a %CatalogApi.CartItem{} struct.
Specs
Extracts %CatalogApi.CartItem{} struct(s) from a raw parsed json response.
If the parsed json response is not handled, returns an error tuple of the
format {:error, :unparseable_catalog_api_items}.