You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that the objects returned by that only have the :id attribute because that's what the JSON has. However, we have NetworkInterface model objects as well.
So, instead of just returning a simple object with an :id field, provide a generic method to call that returns a real model object if we have one that wraps it. The :id field should still exist, too, in case users want to use the original value. So, something like:
Another option would be to either modify the ResourceGroupBasedService#get method to accept an id string, or to provide a find_by_id method that smartly determined which Service#get method to call.
For example, if I want to get a list of network interfaces for a virtual machine I could do this:
The problem is that the objects returned by that only have the :id attribute because that's what the JSON has. However, we have NetworkInterface model objects as well.
So, instead of just returning a simple object with an :id field, provide a generic method to call that returns a real model object if we have one that wraps it. The :id field should still exist, too, in case users want to use the original value. So, something like:
The text was updated successfully, but these errors were encountered: