public function pollUntilComplete($options = [])
    {
        if ($this->isDone()) {
            return true;
        }

        $pollSettings = array_merge($this->defaultPollSettings, $options);
        return $this->poll(function () {
            $this->reload();
            return $this->isDone();
        }, $pollSettings);
    }
public function pollUntilComplete($options = [])
    {
        if ($this->isDone()) {
            return true;
        }

        $pollSettings = array_merge($this->defaultPollSettings, $options);
        return $this->poll(function () {
            $this->reload();
            return $this->isDone();
        }, $pollSettings);
    }
public function pollUntilComplete ( $ options = [ ] ) { if ( $ this -> isDone ( ) ) { return true ; } $ pollSettings = array_merge ( $ this -> defaultPollSettings , $ options ) ; return $ this -> poll ( function ( ) { $ this -> reload ( ) ; return $ this -> isDone ( ) ; } , $ pollSettings ) ; }
Poll the server in a loop until the operation is complete.

Return true if the operation completed, otherwise return false. If the
$options['totalPollTimeoutMillis'] setting is not set (or set <= 0) then
pollUntilComplete will continue polling until the operation completes,
and therefore will always return true.

@param array $options {
Options for configuring the polling behaviour.

@type int $initialPollDelayMillis The initial polling interval to use, in milliseconds.
@type int $pollDelayMultiplier    Multiplier applied to the polling interval on each retry.
@type int $maxPollDelayMillis     The maximum polling interval to use, in milliseconds.
@type int $totalPollTimeoutMillis The maximum amount of time to continue polling, in milliseconds.
}
@throws ApiException If an API call fails.
@throws ValidationException
@return bool Indicates if the operation completed.
Poll the server in a loop until the operation is complete .