def METHOD_NAME(self) -> str:
    with tempfile.NamedTemporaryFile(delete=False) as fp:
        cred_json = json.dumps(self.dict(), indent=4, separators=(",", ": "))
        fp.write(cred_json.encode())
        return fp.name