Skip to content

Instantly share code, notes, and snippets.

@drewtempelmeyer
Created November 22, 2012 04:25
Show Gist options
  • Save drewtempelmeyer/4129411 to your computer and use it in GitHub Desktop.
Save drewtempelmeyer/4129411 to your computer and use it in GitHub Desktop.
result = @transaction.lookup[:lookup_response][:lookup_result]
cart_item_response = result[:cart_items_response][:cart_item_response]
total_tax = cart_item_response.map { |item| item[:tax_amount].to_f }.inject(:+)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment