Skip to content
This repository has been archived by the owner on Feb 23, 2020. It is now read-only.

Make update shipment handler accept inventory units #39

Closed
wants to merge 4 commits into from
Closed

Make update shipment handler accept inventory units #39

wants to merge 4 commits into from

Conversation

athal7
Copy link

@athal7 athal7 commented Aug 29, 2014

In
a1c78bb,
we updated the shipment serializer to push inventory units, so if we are
updating, we should use them as well in case there is a variant mismatch
as there is with exchanges

If a shipment happens to be created using the add_shipment_handler
instead of pushed with the serializer, even though that builds inventory
units from the line items matching the shipment items skus, we should
still be ok because it should match the inventory units similarly to how
it previously matched line items.

In
a1c78bb,
we updated the shipment serializer to push inventory units, so if we are
updating, we should use them as well in case there is a variant mismatch
as there is with exchanges

If a shipment happens to be created using the add_shipment_handler
instead of pushed with the serializer, even though that builds inventory
units from the line items matching the shipment items skus, we should
still be ok because it should match the inventory units similarly to how
it previously matched line items.
@athal7
Copy link
Author

athal7 commented Aug 29, 2014

it appears there is a single failing test on the shipment serializer, presumably introduced by 16e4cea

@JDutil
Copy link
Member

JDutil commented Sep 16, 2014

Was this for master only? I think we made other branches also serialize inventory units instead of line items. Probably need to update the other branches as well I assume?

@athal7
Copy link
Author

athal7 commented Sep 16, 2014

@JDutil it appears the shipment serializer also uses inventory units on older versions as well, so this should probably be backported.

@JDutil JDutil closed this in 7c47ee0 Sep 16, 2014
JDutil pushed a commit that referenced this pull request Sep 16, 2014
In
a1c78bb,
we updated the shipment serializer to push inventory units, so if we are
updating, we should use them as well in case there is a variant mismatch
as there is with exchanges

If a shipment happens to be created using the add_shipment_handler
instead of pushed with the serializer, even though that builds inventory
units from the line items matching the shipment items skus, we should
still be ok because it should match the inventory units similarly to how
it previously matched line items.

Change update shipment handler to expect flattened inventory items, since that is what is generated in the serializer

Make sure to cast quantity to an integer

Handle multiple inventory units of the same sku and quantity in update shipment handler

Fixes #39
JDutil pushed a commit that referenced this pull request Sep 16, 2014
In
a1c78bb,
we updated the shipment serializer to push inventory units, so if we are
updating, we should use them as well in case there is a variant mismatch
as there is with exchanges

If a shipment happens to be created using the add_shipment_handler
instead of pushed with the serializer, even though that builds inventory
units from the line items matching the shipment items skus, we should
still be ok because it should match the inventory units similarly to how
it previously matched line items.

Change update shipment handler to expect flattened inventory items, since that is what is generated in the serializer

Make sure to cast quantity to an integer

Handle multiple inventory units of the same sku and quantity in update shipment handler

Fixes #39
@JDutil
Copy link
Member

JDutil commented Sep 16, 2014

Done as far back as is using IU Serializer

@athal7
Copy link
Author

athal7 commented Sep 16, 2014

👌

jordan-brough pushed a commit to jordan-brough/spree_wombat that referenced this pull request Mar 4, 2015
Add more information to return items
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants