DrewM\MailChimp\Batch::execute PHP Method

execute() public method

Execute the batch request
public execute ( integer $timeout = 10 ) : array | false
$timeout integer Request timeout in seconds (optional)
return array | false Assoc array of API response, decoded from JSON
    public function execute($timeout = 10)
    {
        $req = array('operations' => $this->operations);
        $result = $this->MailChimp->post('batches', $req, $timeout);
        if ($result && isset($result['id'])) {
            $this->batch_id = $result['id'];
        }
        return $result;
    }