@classmethod
def response_to_attribute(cls, instance, api_response):
    """
        Convert the API response into attribute of the given instance.

        Example
            If the API response gives us

            ::

                {
                    "hello": "world",
                    "world": "hello"
                }

            this method set the attribute so that they become accessible with
            :code:`instance.hello` :code:`instance.world`.

            .. note::
                The :code:`hello` index (for exampel) is always accessible
                through the following methods

                - :code:`instance.hello`
                - :code:`instance["hello"]`

        :param obj instance: The instance we have to initiate the attribute into.
        :param dict api_response: The API response.
        """
    if isinstance(api_response, dict):
        for key, value in api_response.items():
            setattr(instance, key, value)
    return instance
