Create an base64 encoded XDR string for this :class:`Asset`.

        :return str: A base64 encoded XDR object representing this
            :class:`Asset`.

def xdr(self):
        """Create an base64 encoded XDR string for this :class:`Asset`.

        :return str: A base64 encoded XDR object representing this
            :class:`Asset`.

        """
        asset = Xdr.StellarXDRPacker()
        asset.pack_Asset(self.to_xdr_object())
        return base64.b64encode(asset.get_buffer())