Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jimmijazz/934fea991ac5a8b1b4f688fa225f2f3f to your computer and use it in GitHub Desktop.
Save jimmijazz/934fea991ac5a8b1b4f688fa225f2f3f to your computer and use it in GitHub Desktop.
totalCartPrice = 0
Input.cart.line_items.each do |item|
totalCartPrice += item.line_price.cents
end
Output.shipping_rates = Input.shipping_rates.delete_if do |shipping_rate|
shipping_rate.name.upcase.start_with?("EXPRESS")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment