summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/sdk/account.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-11-30 21:19:30 -0500
committerJules Laplace <jules@okfoc.us>2015-11-30 21:19:30 -0500
commit61bbd7702f6d8f750cee532ba372c1321562cbc8 (patch)
tree10a3df62a27658841164e55c900620d114033fce /StoneIsland/www/js/sdk/account.js
parentded2f8928dd509acc8d4ae1e4131b622c7bb4d9c (diff)
order info
Diffstat (limited to 'StoneIsland/www/js/sdk/account.js')
-rw-r--r--StoneIsland/www/js/sdk/account.js32
1 files changed, 32 insertions, 0 deletions
diff --git a/StoneIsland/www/js/sdk/account.js b/StoneIsland/www/js/sdk/account.js
index fe5f03cd..3eb3f3bd 100644
--- a/StoneIsland/www/js/sdk/account.js
+++ b/StoneIsland/www/js/sdk/account.js
@@ -96,6 +96,38 @@ sdk.account = (function(){
})
}
+ account.fetch_orders = function(opt){
+ return $.ajax({
+ method: "GET",
+ url: sdk.path("Account.API/1.5", "users/" + auth.user_id + "/orders.json"),
+ headers: {
+ "x-yoox-appname": auth.appname,
+ "x-yoox-account-token": auth.access_token,
+ },
+ data: JSON.stringify( opt.data ),
+ success: function(data){
+ opt.success(data)
+ },
+ error: opt.error,
+ })
+ }
+
+ account.fetch_single_order = function(opt){
+ return $.ajax({
+ method: "GET",
+ url: sdk.path("Account.API/1.5", "users/" + auth.user_id + "/orders/" + opt.id + ".json"),
+ headers: {
+ "x-yoox-appname": auth.appname,
+ "x-yoox-account-token": auth.access_token,
+ },
+ data: JSON.stringify( opt.data ),
+ success: function(data){
+ opt.success(data)
+ },
+ error: opt.error,
+ })
+ }
+
return account
})()