diff options
Diffstat (limited to 'StoneIsland/www/js/sdk')
| -rw-r--r-- | StoneIsland/www/js/sdk/account.js | 4 | ||||
| -rw-r--r-- | StoneIsland/www/js/sdk/address.js | 4 | ||||
| -rw-r--r-- | StoneIsland/www/js/sdk/cart.js | 20 | ||||
| -rw-r--r-- | StoneIsland/www/js/sdk/payment.js | 8 | ||||
| -rw-r--r-- | StoneIsland/www/js/sdk/product.js | 4 | ||||
| -rw-r--r-- | StoneIsland/www/js/sdk/shipping.js | 8 |
6 files changed, 24 insertions, 24 deletions
diff --git a/StoneIsland/www/js/sdk/account.js b/StoneIsland/www/js/sdk/account.js index 3dfe2cfe..7e7eb3dc 100644 --- a/StoneIsland/www/js/sdk/account.js +++ b/StoneIsland/www/js/sdk/account.js @@ -5,7 +5,7 @@ sdk.account = (function(){ // https://gist.github.com/fanfare/d18498e7fa25acbd4486 var account = {} account.signup = function(opt){ - $.ajax({ + return $.ajax({ method: "POST", url: sdk.path("Account.API/1.5", "users.json"), headers: { @@ -26,7 +26,7 @@ sdk.account = (function(){ } account.login = function(opt){ - $.ajax({ + return $.ajax({ method: "POST", url: sdk.path("Account.API/1.5", "authfull.json"), headers: { diff --git a/StoneIsland/www/js/sdk/address.js b/StoneIsland/www/js/sdk/address.js index 144589d0..35eaee56 100644 --- a/StoneIsland/www/js/sdk/address.js +++ b/StoneIsland/www/js/sdk/address.js @@ -2,7 +2,7 @@ sdk.address = (function(){ var address = {} address.add = function(opt){ - $.ajax({ + return $.ajax({ method: "POST", url: sdk.path("Account.API/1.5", "users/" + auth.user_id + "/addressBook/item.json"), headers: { @@ -19,7 +19,7 @@ sdk.address = (function(){ } address.list = function(opt){ - $.ajax({ + return $.ajax({ method: "GET", url: sdk.path("Account.API/1.5", "users/" + auth.user_id + "/addressBook.json"), headers: { diff --git a/StoneIsland/www/js/sdk/cart.js b/StoneIsland/www/js/sdk/cart.js index d0c8f6df..26540f59 100644 --- a/StoneIsland/www/js/sdk/cart.js +++ b/StoneIsland/www/js/sdk/cart.js @@ -6,7 +6,7 @@ sdk.cart = (function(){ // https://gist.github.com/fanfare/9a50c524aea417d0bf3e cart.initialize = function(opt){ - $.ajax({ + return $.ajax({ method: "POST", url: sdk.path("Cart.API/1.6", "carts.json"), headers: { @@ -25,7 +25,7 @@ sdk.cart = (function(){ } cart.set_user = function(opt){ - $.ajax({ + return $.ajax({ method: "PUT", url: sdk.path("Cart.API/1.6", "user.json"), headers: { @@ -46,7 +46,7 @@ sdk.cart = (function(){ // Code10, Size, Section cart.add_item = function(opt){ - $.ajax({ + return $.ajax({ method: "POST", url: sdk.path("Cart.API/1.6", "carts/" + cart.id + "/items.json"), headers: { @@ -63,7 +63,7 @@ sdk.cart = (function(){ } cart.delete_item = function(opt){ - $.ajax({ + return $.ajax({ method: "DELETE", url: sdk.path("Cart.API/1.6", "carts/" + cart.id + "/items/" + opt.code10 + @@ -81,7 +81,7 @@ sdk.cart = (function(){ } cart.get_status = function(opt){ - $.ajax({ + return $.ajax({ method: "GET", url: sdk.path("Cart.API/1.6", "carts/" + cart.id), headers: { @@ -103,7 +103,7 @@ sdk.cart = (function(){ // NOTE: data might be wrapped in a Receiver object cart.set_shipping_address = function(opt){ - $.ajax({ + return $.ajax({ method: "PUT", url: sdk.path("Cart.API/1.6", "receiver.json"), headers: { @@ -121,7 +121,7 @@ sdk.cart = (function(){ // NB: Payment type may simply be 1 (credit card) cart.set_payment_type = function(opt){ - $.ajax({ + return $.ajax({ method: "PUT", url: sdk.path("Cart.API/1.6", "carts/" + cart.id + "/paymentType.json"), headers: { @@ -139,7 +139,7 @@ sdk.cart = (function(){ // use with full CC data if not storing it in wallet cart.set_credit_card = function(opt){ - $.ajax({ + return $.ajax({ method: "PUT", url: sdk.path("Cart.API/1.6", "carts/" + cart.id + "/creditCard.json"), headers: { @@ -159,7 +159,7 @@ sdk.cart = (function(){ // NB: if "verification number" is 1, use CVV/CID/CVC security code // if "verification number" is 2, use "Issue Number" cart.use_stored_credit_card = function(opt){ - $.ajax({ + return $.ajax({ method: "PUT", url: sdk.path("Cart.API/1.6", "carts/" + cart.id + "/userCreditCard.json"), headers: { @@ -182,7 +182,7 @@ sdk.cart = (function(){ } cart.finalize = function(opt){ - $.ajax({ + return $.ajax({ method: "PUT", url: sdk.path("Cart.API/1.6", "carts/" + cart.id + "/secureFinalizer.json"), headers: { diff --git a/StoneIsland/www/js/sdk/payment.js b/StoneIsland/www/js/sdk/payment.js index 048cde4b..0076fbf8 100644 --- a/StoneIsland/www/js/sdk/payment.js +++ b/StoneIsland/www/js/sdk/payment.js @@ -2,7 +2,7 @@ sdk.payment = (function(){ var payment = {} payment.list_credit_cards = function(opt){ - $.ajax({ + return $.ajax({ method: "GET", url: sdk.path("Account.API/1.5", "users/" + auth.user_id + "/cards.json"), headers: { @@ -19,7 +19,7 @@ sdk.payment = (function(){ } payment.add_credit_card = function(opt){ - $.ajax({ + return $.ajax({ method: "POST", url: sdk.path("Account.API/1.5", "users/" + auth.user_id + "/cards.json"), headers: { @@ -36,7 +36,7 @@ sdk.payment = (function(){ } payment.delete_credit_card = function(opt){ - $.ajax({ + return $.ajax({ method: "DELETE", url: sdk.path("Account.API/1.5", "users/" + auth.user_id + "/cards/" + opt.guid + ".json"), headers: { @@ -52,7 +52,7 @@ sdk.payment = (function(){ } payment.get_payment_types = function(opt){ - $.ajax({ + return $.ajax({ method: "GET", url: sdk.path("Cart.API/1.6", "availablePaymentTypes.json"), headers: { diff --git a/StoneIsland/www/js/sdk/product.js b/StoneIsland/www/js/sdk/product.js index a2ba30a1..2cf58452 100644 --- a/StoneIsland/www/js/sdk/product.js +++ b/StoneIsland/www/js/sdk/product.js @@ -2,7 +2,7 @@ sdk.product = (function(){ var product = {} product.collection = function(opt){ - $.ajax({ + return $.ajax({ method: "GET", url: sdk.path("Search.API/1.2", "search.json"), data: { format: "full", gallery: opt.gallery_id }, @@ -13,7 +13,7 @@ sdk.product = (function(){ // https://gist.github.com/fanfare/2d25d1b36944188948ff product.item = function(opt){ - $.ajax({ + return $.ajax({ method: "GET", url: sdk.path("Item.API/1.0", "item/" + opt.code + ".json"), success: opt.success, diff --git a/StoneIsland/www/js/sdk/shipping.js b/StoneIsland/www/js/sdk/shipping.js index 400d3199..893c1172 100644 --- a/StoneIsland/www/js/sdk/shipping.js +++ b/StoneIsland/www/js/sdk/shipping.js @@ -6,7 +6,7 @@ sdk.shipping = (function(){ // BOX TYPE shipping.get_box_types = function(opt){ - $.ajax({ + return $.ajax({ method: "GET", url: sdk.path("Cart.API/1.6", "carts/" + cart.id + "/availableBoxTypes.json"), headers: { @@ -22,7 +22,7 @@ sdk.shipping = (function(){ } shipping.set_box_type = function(opt){ - $.ajax({ + return $.ajax({ method: "PUT", url: sdk.path("Cart.API/1.6", "carts/" + cart.id + "/boxType.json"), headers: { @@ -44,7 +44,7 @@ sdk.shipping = (function(){ // DELIVERY TYPES shipping.get_delivery_types = function(opt){ - $.ajax({ + return $.ajax({ method: "GET", url: sdk.path("Cart.API/1.6", "carts/" + cart.id + "/availableDeliveryTypes.json"), headers: { @@ -60,7 +60,7 @@ sdk.shipping = (function(){ } shipping.set_delivery_type = function(opt){ - $.ajax({ + return $.ajax({ method: "PUT", url: sdk.path("Cart.API/1.6", "carts/" + cart.id + "/availableBoxTypes.json"), headers: { |
