When disconnecting a tenant, the gem issues a secondary request to list connections. This is a slightly strange API - generally I would expect a method like this to return a truthy value if the request has succeeded. An API call is generally relatively slow, and making two introduces many unwanted race conditions (for instance, what happens to program control flow if the DELETE request here passes but the GET for connections fails? Any retry logic I have will now need to take this possibility into account)
Additionally, I can call #connections again myself if I need a listing.
https://github.com/XeroAPI/xero-ruby/blob/master/lib/xero-ruby/api_client.rb#L263-L268
When disconnecting a tenant, the gem issues a secondary request to list connections. This is a slightly strange API - generally I would expect a method like this to return a truthy value if the request has succeeded. An API call is generally relatively slow, and making two introduces many unwanted race conditions (for instance, what happens to program control flow if the
DELETE
request here passes but theGET
for connections fails? Any retry logic I have will now need to take this possibility into account)Additionally, I can call
#connections
again myself if I need a listing.Would you accept a patch that removes this?