Skip to content

Commit

Permalink
Merge pull request #43 from bigcommerce/cartopts
Browse files Browse the repository at this point in the history
API endpoint for cart option changing
  • Loading branch information
hegrec committed Sep 4, 2015
2 parents e970f83 + 5c6b816 commit bee6ba2
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/api/product-attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default class extends Base

// set up class variables
this.endpoint = '/product-attributes/';
this.inCartEndpoint = '/configure-options/';
}

/**
Expand All @@ -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);
});
}
}

0 comments on commit bee6ba2

Please sign in to comment.