Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save allenmichael/28b0907075107b7c2be6 to your computer and use it in GitHub Desktop.
Save allenmichael/28b0907075107b7c2be6 to your computer and use it in GitHub Desktop.
Shipping Arc.js Action Exercise 7-3
module.exports = function(context, callback) {
try {
var firstShippingRatePrice = context.response.body.rates[0].shippingRates[0].amount;
context.response.body.rates[0].shippingRates[0].amount = Math.floor(firstShippingRatePrice + (firstShippingRatePrice * 0.25));
} catch(err) {
console.error(err);
}
callback();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment