CatalogApi v0.0.13 CatalogApi.Fixture View Source
Provides %HTTPoison.Response{}
fixtures of CatalogAPI responses.
These can be used to write tests which ensure that everything is wired up correctly through the CatalogApi package.
Link to this section Summary
Functions
Returns a %HttpPoison.Response{}
struct with a 400 status code and a body
which contains an error response indicating that the supplied cart_version
parameter did not match the current version of the cart
Returns a %HTTPPoison.Response{}
struct with a 200 status code and a body
which contains a successful response to the cart_add_item method
Returns a %HTTPPoison.Response{}
struct with a 200 status code and a body
which contains a successful response to the cart_order_place method
Returns a %HTTPPoison.Response{}
struct with a 200 status code and a body
which contains a successful response to the cart_set_address method
Returns a %HTTPPoison.Response{}
struct with a 200 status code and a body
which contains a response from CatalogAPI indicating that the shopping cart
is empty
Returns a %HTTPPoison.Response{}
struct with a 200 status code and a body
which contains a response from CatalogAPI indicating that the address did not
have a valid address
Returns a %HTTPPoison.Response{}
struct with a 200 status code and a body
which contains a successful response to the cart_view method
Returns a %HTTPPoison.Response{}
struct with a 400 status code and a body
which matches the Fault json structure that CatalogApi returns
Returns a %HTTPPoison.Response{}
struct with a 500 status code
Returns a %HTTPPoison.Response{}
struct with a 400 status code and a body
which contains a response to the view_item method indicating that the
requested item did not exit
Returns a %HTTPPoison.Response{}
struct with a 200 status code and a body
which contains a successful response to the search_catalog method
Returns a %HTTPPoison.Response{}
struct with a 200 status code and a body
which contains a successful response to the view_item method
Link to this section Functions
Returns a %HttpPoison.Response{}
struct with a 400 status code and a body
which contains an error response indicating that the supplied cart_version
parameter did not match the current version of the cart.
Returns only the body text if passed an argument of false to as_response
.
Returns a %HTTPPoison.Response{}
struct with a 200 status code and a body
which contains a successful response to the cart_add_item method.
Returns only the body text if passed an argument of false to as_response
.
Returns a %HTTPPoison.Response{}
struct with a 200 status code and a body
which contains a successful response to the cart_order_place method.
Returns only the body text if passed an argument of false to as_response
.
Returns a %HTTPPoison.Response{}
struct with a 200 status code and a body
which contains a successful response to the cart_set_address method.
Returns only the body text if passed an argument of false to as_response
.
Returns a %HTTPPoison.Response{}
struct with a 200 status code and a body
which contains a response from CatalogAPI indicating that the shopping cart
is empty.
Returns only the body text if passed an argument of false to as_response
.
Returns a %HTTPPoison.Response{}
struct with a 200 status code and a body
which contains a response from CatalogAPI indicating that the address did not
have a valid address.
Returns only the body text if passed an argument of false to as_response
.
Returns a %HTTPPoison.Response{}
struct with a 200 status code and a body
which contains a successful response to the cart_view method.
Returns only the body text if passed an argument of false to as_response
.
fault(boolean()) :: String.t() | HTTPoison.Response.t()
fault(boolean()) :: String.t() | HTTPoison.Response.t()
Returns a %HTTPPoison.Response{}
struct with a 400 status code and a body
which matches the Fault json structure that CatalogApi returns.
Returns only the body text if passed an argument of false to as_response
.
Returns a %HTTPPoison.Response{}
struct with a 500 status code.
no_item_fault(boolean()) :: String.t() | HTTPoison.Response.t()
Returns a %HTTPPoison.Response{}
struct with a 400 status code and a body
which contains a response to the view_item method indicating that the
requested item did not exit
Returns only the body text if passed an argument of false to as_response
.
search_catalog_success(boolean()) :: String.t() | HTTPoison.Response.t()
Returns a %HTTPPoison.Response{}
struct with a 200 status code and a body
which contains a successful response to the search_catalog method.
Returns only the body text if passed an argument of false to as_response
.
view_item_success(boolean()) :: String.t() | HTTPoison.Response.t()
Returns a %HTTPPoison.Response{}
struct with a 200 status code and a body
which contains a successful response to the view_item method.
Returns only the body text if passed an argument of false to as_response
.