libinterchange
ord.h
Go to the documentation of this file.
1#ifndef INTERCHANGE_ORD_H
2#define INTERCHANGE_ORD_H
3
5
8 unsigned int quantity;
9 char *name;
10};
11
13 double subtotal;
14 double shipping;
15 double total_cost;
16 char *profile;
17 size_t nitems;
19};
20
24 double total_cost;
25};
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
39void interchange_ord_order(const char *sku, const char *item,
40 const unsigned int quantity, const char *options[][2],
41 void (*parser)(interchange_response *));
42
51void interchange_ord_update(const char *name, const unsigned int quantity,
52 const char *orderpage, const char *nextpage,
53 void (*parser)(interchange_response *));
54
62#define interchange_ord_remove(a, b, c, d) interchange_ord_update(a, 0, b, c, d)
63
71void interchange_ord_checkout(const char *order_profile,
72 struct interchange_member member,
73 void (*handler)(interchange_response *));
74
76
78 *transaction);
79
80#ifdef __cplusplus
81}
82#endif
83
84#endif
void interchange_ord_free_order(struct interchange_ord_order *order)
void interchange_ord_checkout(const char *order_profile, struct interchange_member member, void(*handler)(interchange_response *))
For checking out items in the cart.
void interchange_ord_clear_transaction(struct interchange_ord_transaction *transaction)
void interchange_ord_update(const char *name, const unsigned int quantity, const char *orderpage, const char *nextpage, void(*parser)(interchange_response *))
For updating the quantity of an item in a cart.
Definition: member.h:12
Definition: ord.h:6
unsigned int quantity
Definition: ord.h:8
char * name
Definition: ord.h:9
struct interchange_product product
Definition: ord.h:7
Definition: ord.h:12
double subtotal
Definition: ord.h:13
char * profile
Definition: ord.h:16
double total_cost
Definition: ord.h:15
struct interchange_ord_item ** items
Definition: ord.h:18
size_t nitems
Definition: ord.h:17
double shipping
Definition: ord.h:14
Definition: ord.h:21
double total_cost
Definition: ord.h:24
char * order_number
Definition: ord.h:22
char * payment_method
Definition: ord.h:23
Definition: interchange.h:6
Definition: typedefs.h:10