Only destroy tax adjustment for open order when the associated tax rate is deleted. For closed order just nullify the source_id.

Update line_item & order when adjustments are deleted.

Add rspec tests to cover cases where adjustments get (or not get) destroyed when taxrate/promotion is deleted.

Move deals_with_adjustments to a separate mixin.

Add new mixin to core

Revert previous changes to remove unnecessary tests.

Remove order.update! and simplify rspec.

Fixes #4828
Fixes #4771
Merge pull request #4900 from reinaris/patch-3

adjustment_state (icon) returns 'fa fa-lock'
Update shipment in proper chronological order

Every time the selected shipping rate has changed as a shipment cost
change should be propagated through order totals and states

About #4845

Conflicts:
	api/app/controllers/spree/api/shipments_controller.rb
When creating shipment assign orders shipping address. Fixes #4915 Fixes #4654
Payment methods should be scoped to available.
[api] Convert payment_method_id to string in CheckoutsController

Without this, payment information coming in through JSON will result in a payment which has no source
[api] Do not wrap parameters in OrdersController

This fixes the problem where POST /api/orders with no parameters would result in the parameters coming to the controller as params[:order], courtesy of this:

https://github.com/rails/rails/blob/master/actionpack/lib/action_controller/metal/params_wrapper.rb

Disabling it means that we can't submit JSON parameters without a root element, but really we don't advise people to do that, so I think it's a small thing to lose
Fix typo in Spree::ReturnAuthorization model
Validate price maximum.

Price is constrained to be precision: 8, scale: 2 at the database level,
but that validation isn't reflected in the model.

This will lead to errors when prices are 1,000,000 or above, which is a
lot in USD, but 1 million Vietnamese Dongs is less than $50 USD.

Fixes #4944