public function sync()
    {
        // @todo Add support for filtering.
        $query = [
            'clientId' => $this->clientId,
            'form' => 'cjson',
            'schema' => '1.10',
        ];

        if ($this->authenticatedClient->hasAccount()) {
            $query['account'] = (string) $this->authenticatedClient->getAccount()->getMpxId();
        }

        return $this->authenticatedClient->requestAsync('GET', $this->uri, [
            'query' => $query,
        ])->then(function (ResponseInterface $response) {
            $data = \GuzzleHttp\json_decode($response->getBody(), true);

            return $data[0]['id'];
        });
    }
public function sync()
    {
        // @todo Add support for filtering.
        $query = [
            'clientId' => $this->clientId,
            'form' => 'cjson',
            'schema' => '1.10',
        ];

        if ($this->authenticatedClient->hasAccount()) {
            $query['account'] = (string) $this->authenticatedClient->getAccount()->getMpxId();
        }

        return $this->authenticatedClient->requestAsync('GET', $this->uri, [
            'query' => $query,
        ])->then(function (ResponseInterface $response) {
            $data = \GuzzleHttp\json_decode($response->getBody(), true);

            return $data[0]['id'];
        });
    }
public function sync ( ) { // @todo Add support for filtering. $ query = [ 'clientId' => $ this -> clientId , 'form' => 'cjson' , 'schema' => '1.10' , ] ; if ( $ this -> authenticatedClient -> hasAccount ( ) ) { $ query [ 'account' ] = ( string ) $ this -> authenticatedClient -> getAccount ( ) -> getMpxId ( ) ; } return $ this -> authenticatedClient -> requestAsync ( 'GET' , $ this -> uri , [ 'query' => $ query , ] ) -> then ( function ( ResponseInterface $ response ) { $ data = \ GuzzleHttp \ json_decode ( $ response -> getBody ( ) , true ) ; return $ data [ 0 ] [ 'id' ] ; } ) ; }
Return the last available sync ID to synchronize notifications.

@see https://docs.theplatform.com/help/wsf-subscribing-to-change-notifications#tp-toc10

@return \GuzzleHttp\Promise\PromiseInterface A promise to return the last sync ID as an integer.
Return the last available sync ID to synchronize notifications .