public function send(array $campaign)
    {
        $this->assertValidCampaign($campaign);

        $request = new Request('campaigns');
        $request->addSubresource(['name' => 'send']);
        $request->setParams($campaign);

        $response = $this->client->post($request);

        $this->assertSuccessResponse($response);

        return $response->getData();
    }
public function send(array $campaign)
    {
        $this->assertValidCampaign($campaign);

        $request = new Request('campaigns');
        $request->addSubresource(['name' => 'send']);
        $request->setParams($campaign);

        $response = $this->client->post($request);

        $this->assertSuccessResponse($response);

        return $response->getData();
    }
public function send ( array $ campaign ) { $ this -> assertValidCampaign ( $ campaign ) ; $ request = new Request ( 'campaigns' ) ; $ request -> addSubresource ( [ 'name' => 'send' ] ) ; $ request -> setParams ( $ campaign ) ; $ response = $ this -> client -> post ( $ request ) ; $ this -> assertSuccessResponse ( $ response ) ; return $ response -> getData ( ) ; }
Send campaign.

@link https://rule.se/apidoc/#campaigns-send-campaign-post

@param array $campaign Campaign data formated according {@link https://rule.se/apidoc/#campaigns-send-campaign-post}
@return array
@throws \Exception, InvalidArgumentException
Send campaign .