mage.api_resources.abstract.data_api_resource module

class mage.api_resources.abstract.data_api_resource.DataAPIResource

Bases: object

This class manages the data object for subclasses. It redirects attribute requests to the data object if they are not found in the subclass. In order to access an attribute in the data object that also exists in the subclass it must be explicitly referenced like self.data.attr instead of just self.attr.

classmethod init(data)

This creates a new cls instance with data.

Parameters

data – The data for this instance

Returns

New class instance

refresh(field=None)

Retrieve the object from the server.

Parameters

field (str, optional) – Name of the field to update. (Default: update all fields)

Returns

None