Currently, TokenWrapper wraps higher level operations. For example:
TokenWrapper.refresh(config, connection) do
inventory = Inventory.new(self)
inventory.has_instance_status?(...)
end
This is fine for higher level operations that perform GETs, especially single GETs. However, this will be problematic for higher level operations that perform multiple POSTs, PUTs, or DELETEs, as it might result in them being repeated even when they succeeded.
For this ticket, refactor the use of TokenWrapper so that the lower level methods (FolioClient.get, FolioClient.post) are wrapped.
Currently, TokenWrapper wraps higher level operations. For example:
This is fine for higher level operations that perform GETs, especially single GETs. However, this will be problematic for higher level operations that perform multiple POSTs, PUTs, or DELETEs, as it might result in them being repeated even when they succeeded.
For this ticket, refactor the use of TokenWrapper so that the lower level methods (FolioClient.get, FolioClient.post) are wrapped.