/** * Send a test send of a campaign * @param string $accessToken - Constant Contact OAuth2 access token * @param int $campaignId - Id of campaign to send test of * @param TestSend $test_send - Test send details * @return TestSend */ public function sendTest($accessToken, $campaignId, TestSend $test_send) { $baseUrl = Config::get('endpoints.base_url') . sprintf(Config::get('endpoints.campaign_test_sends'), $campaignId); $url = $this->buildUrl($baseUrl); $response = parent::getRestClient()->post($url, parent::getHeaders($accessToken), $test_send->toJson()); return TestSend::create(json_decode($response->body, true)); }