summaryrefslogtreecommitdiffstats
path: root/cpp/sca/test/store-script/shopping-cart.scm
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/sca/test/store-script/shopping-cart.scm')
-rw-r--r--cpp/sca/test/store-script/shopping-cart.scm26
1 files changed, 26 insertions, 0 deletions
diff --git a/cpp/sca/test/store-script/shopping-cart.scm b/cpp/sca/test/store-script/shopping-cart.scm
new file mode 100644
index 0000000000..ebb3504e25
--- /dev/null
+++ b/cpp/sca/test/store-script/shopping-cart.scm
@@ -0,0 +1,26 @@
+; Shopping cart implementation
+
+(define (post item)
+ (uuid)
+)
+
+(define (getall)
+ (cons "Sample Feed" (cons (uuid) '()))
+)
+
+(define (get id)
+ (define entry (list (list 'name "Apple") (list 'currencyCode "USD") (list 'currencySymbol "$") (list 'price 2.99)))
+ (cons "Item" (list id entry))
+)
+
+(define (delete id)
+ true
+)
+
+(define (gettotal)
+ 11.0
+)
+
+; TODO remove these JSON-RPC specific functions
+(define (system.listMethods) (list "Service.getTotal"))
+(define Service.getTotal gettotal)