blob: a1dd4eaf43b359d00fa6c9c347f85036e3b85296 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#ifndef ICCLIENT_ORD_H
#define ICCLIENT_ORD_H
struct icclient_ord_item {
struct icclient_product *product;
unsigned int quantity;
};
struct icclient_ord_order {
double subtotal;
double shipping;
double total_cost;
char *profile;
size_t nitems;
struct icclient_ord_item *items[];
};
#ifdef __cplusplus
extern "C" {
#endif
void icclient_ord_init(struct icclient_ord_order *order);
/*!
* \brief For putting an item to a cart.
* \param sku The SKU of the item to order.
* \param catalog A pointer to the catalog from which the item is.
* \param orderptr A pointer to pointer to the order.
*/
void icclient_ord_order(const char *sku, const struct icclient_catalog *catalog,
struct icclient_ord_order **orderptr);
void icclient_ord_checkout(struct icclient_ord_order *order,
struct icclient_member *member);
void icclient_ord_free(struct icclient_ord_order *order);
#ifdef __cplusplus
}
#endif
#endif // ICCLIENT_ORD_H
|