diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-05-13 18:06:01 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-05-13 18:06:01 +0800 |
commit | 8899052cef9b4e8d2682279ab9bc2d3ae09cb0ce (patch) | |
tree | 05375fb9931fb03235cbe13044101ad177307afd /interchange/ord.h | |
parent | 77ded2a3b9142073f1ea74b948ad3219c6b245df (diff) |
Function for updating quantity
Diffstat (limited to 'interchange/ord.h')
-rw-r--r-- | interchange/ord.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/interchange/ord.h b/interchange/ord.h index 16c4e64..fa55da1 100644 --- a/interchange/ord.h +++ b/interchange/ord.h @@ -38,14 +38,25 @@ void interchange_ord_order(const char *sku, void (*handler)(interchange_response *)); /*! + * \brief For updating the quantity of an item in a cart. + * \param name The name given, in the cart, to the item. + * \param quantity The desired quantity. + * \param orderpage The order page, by default it's ord/basket. + * \param nextpage The page to expect response from, whatever the result is. + * \param parser Function for parsing the formatted response. + */ +void interchange_ord_update(const char *name, const unsigned int quantity, + const char *orderpage, const char *nextpage, + void (*parser)(interchange_response *)); + +/*! * \brief For removing an item from a cart. * \param name The name given, in the cart, to the item. * \param orderpage The order page, by default it's ord/basket. * \param nextpage The page to expect response from, whatever the result is. * \param parser Function for parsing the formatted response. */ -void interchange_ord_remove(const char *name, const char *orderpage, - const char *nextpage, void (*parser)(interchange_response *)); +#define interchange_ord_remove(a, b, c, d) interchange_ord_update(a, 0, b, c, d) /*! * \brief For checking out items in the cart. |