From 5c6b816276133005128435ec834003dd2b64e0f2 Mon Sep 17 00:00:00 2001 From: Chris Hegre Date: Fri, 4 Sep 2015 11:44:39 -0700 Subject: [PATCH] API endpoint for cart option changing --- src/api/product-attributes.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/api/product-attributes.js b/src/api/product-attributes.js index 05ded5b..625b577 100644 --- a/src/api/product-attributes.js +++ b/src/api/product-attributes.js @@ -13,6 +13,7 @@ export default class extends Base // set up class variables this.endpoint = '/product-attributes/'; + this.inCartEndpoint = '/configure-options/'; } /** @@ -32,4 +33,16 @@ export default class extends Base callback(err, response); }); } + + /** + * @param {Number} itemId + * @param {Object} params + * @param callback + */ + configureInCart(itemId, params, callback) + { + this.remoteRequest(this.inCartEndpoint + itemId, 'GET', params, (err, response) => { + callback(err, response); + }); + } }