def to_array(self):
        """
        Serializes this ShippingQuery to a dictionary.

        :return: dictionary representation of this object.
        :rtype: dict
        """
        array = super(ShippingQuery, self).to_array()
        array['id'] = u(self.id)  # py2: type unicode, py3: type str
        array['from'] = self.from_peer.to_array()  # type User
        array['invoice_payload'] = u(self.invoice_payload)  # py2: type unicode, py3: type str
        array['shipping_address'] = self.shipping_address.to_array()  # type ShippingAddress
        return array