How can I slice the shipping line information inside of the Order into the smaller parts?
If Order contains multiple fulfillment orders (so goes to multiple locations), it also can have aggregated shipping line.
For example:
Order contains 2 fulfillment orders: first for the LocationA, second for the LocationB.
For shipping was selected rate called “Standard”.
LocationA assigned to the shipping origin with rate $0.01.
LocationB assigned to the shipping origin with rate $0.02.
Final shipping cost will be $0.03.
So handle will be “shopify-Standard-0.03”.
But the thing is, that I need separated “shopify-Standard-0.01” and “shopify-Standard-0.02”.
Order also has field “shippingLines”, which contains the list of shipping lines, but it also has only 1 shipping line even if it was aggregated.
Things are getting even harder, if order applies certain conditions (e.g. weight or final price).
The question is, how to find these smaller shipping line parts?