def __new__(cls, **data): check.is_dict( data, value_type=(str, float, int, bool), desc="Record fields must be one of types: (str, float, int, bool)", ) return super(TableRecord, cls).__new__(cls, data=data)
def test_is_dict(kwargs, should_succeed): if should_succeed: assert check.is_dict(**kwargs) == kwargs["obj"] else: with pytest.raises(CheckError): check.is_dict(**kwargs)
def start_sync(self, connection_id: str) -> dict: return check.is_dict( self.make_request(endpoint="/connections/sync", data={"connectionId": connection_id}) )
def get_job_status(self, job_id: int) -> dict: return check.is_dict(self.make_request(endpoint="/jobs/get", data={"id": job_id}))
def get_connection_details(self, connection_id: str) -> dict: return check.is_dict( self.make_request(endpoint="/connections/get", data={"connectionId": connection_id}) )