diff options
Diffstat (limited to 'sca-cpp/trunk/test/store-script/shopping-cart.scm')
-rw-r--r-- | sca-cpp/trunk/test/store-script/shopping-cart.scm | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/sca-cpp/trunk/test/store-script/shopping-cart.scm b/sca-cpp/trunk/test/store-script/shopping-cart.scm new file mode 100644 index 0000000000..ebb3504e25 --- /dev/null +++ b/sca-cpp/trunk/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) |