-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
Description
Currently our implementation only allows users to get new information based on changes in Newgistics by performing the same query again so something like
original_shipment = Newgistics::Shipment.where(id: 'R577274665').first
described_class.cancel_box(payload)
updated_shipment = Newgistics::Shipment.where(id: 'R577274665').first
expect(updated_shipment.shipment_status).to eq('CANCELED')
With this proposed change we would add in the reload function to our models so that we can perform the following instead of having to query Newgistics again ourselves explicitly
original_shipment = Newgistics::Shipment.where(id: 'R577274665').first
described_class.cancel_box(payload)
expect(original_shipment.reload.shipment_status).to eq('CANCELED')