lib/API/CampaignsApi.php
/**
     * Operation updateCampaignAsyncWithHttpInfo
     *
     * Update Campaign
     *
     * @param  string $campaign_id (required)
     * @param  string $list_id The list you will send the campaign to. (optional)
     * @param  string $template_id The ID of the Email Template object that will be the content of this campaign. Note the Email Template is copied when creating this campaign, so future changes to that Email Template will not alter the content of this campaign. (optional)
     * @param  string $from_email The email address your email will be sent from and will be used in the reply-to header. (optional)
     * @param  string $from_name The name or label associated with the email address you&#39;re sending from. (optional)
     * @param  string $subject The email subject of the campaign (optional)
     * @param  string $name A name for this campaign. If not specified, this will default to the subject of the campaign. (optional)
     * @param  bool $use_smart_sending If set, limits the number of emails sent to an individual within a short period. Campaigns initially default to &#x60;true&#x60;. (optional)
     * @param  bool $add_google_analytics If specified, adds Google Analytics tracking tags to links. Campaigns initially default to &#x60;false&#x60;. (optional)
     *
     * @throws \InvalidArgumentException
     * @return \GuzzleHttp\Promise\PromiseInterface
     */
Operation updateCampaignAsyncWithHttpInfo
Update Campaign

@param  string $campaign_id (required)
@param  string $list_id The list you will send the campaign to. (optional)
@param  string $template_id The ID of the Email Template object that will be the content of this campaign. Note the Email Template is copied when creating this campaign, so future changes to that Email Template will not alter the content of this campaign. (optional)
@param  string $from_email The email address your email will be sent from and will be used in the reply-to header. (optional)
@param  string $from_name The name or label associated with the email address you're sending from. (optional)
@param  string $subject The email subject of the campaign (optional)
@param  string $name A name for this campaign. If not specified, this will default to the subject of the campaign. (optional)
@param  bool $use_smart_sending If set, limits the number of emails sent to an individual within a short period. Campaigns initially default to `true`. (optional)
@param  bool $add_google_analytics If specified, adds Google Analytics tracking tags to links. Campaigns initially default to `false`. (optional)


Operation updateCampaignAsyncWithHttpInfo Update Campaign @param string $campaign_id ( required ) @param string $list_id The list you will send the campaign to . ( optional ) @param string $template_id The ID of the Email Template object that will be the content of this campaign . Note the Email Template is copied when creating this campaign so future changes to that Email Template will not alter the content of this campaign . ( optional ) @param string $from_email The email address your email will be sent from and will be used in the reply - to header . ( optional ) @param string $from_name The name or label associated with the email address you ' re sending from . ( optional ) @param string $subject The email subject of the campaign ( optional ) @param string $name A name for this campaign . If not specified this will default to the subject of the campaign . ( optional ) @param bool $use_smart_sending If set limits the number of emails sent to an individual within a short period . Campaigns initially default to ` true ` . ( optional ) @param bool $add_google_analytics If specified adds Google Analytics tracking tags to links . Campaigns initially default to ` false ` . ( optional )
public function updateCampaignAsyncWithHttpInfo($campaign_id, $list_id = null, $template_id = null, $from_email = null, $from_name = null, $subject = null, $name = null, $use_smart_sending = null, $add_google_analytics = null)
    {
        $returnType = 'array<string,object>';
        $request = $this->updateCampaignRequest($campaign_id, $list_id, $template_id, $from_email, $from_name, $subject, $name, $use_smart_sending, $add_google_analytics);
        return $this->client
            ->sendAsync($request, $this->createHttpClientOption())
            ->then(
                function ($response) use ($returnType) {
                    if ($returnType === '\SplFileObject') {
                        $content = $response->getBody(); 
                    } else {
                        $content = (string) $response->getBody();
                    }
                    return [
                        ObjectSerializer::deserialize($content, $returnType, []),
                        $response->getStatusCode(),
                        $response->getHeaders()
                    ];
                },
                function ($exception) {
                    $response = $exception->getResponse();
                    $statusCode = $response->getStatusCode();
                    throw new ApiException(
                        sprintf(
                            '[%d] Error connecting to the API (%s)',
                            $statusCode,
                            $exception->getRequest()->getUri()
                        ),
                        $statusCode,
                        $response->getHeaders(),
                        (string) $response->getBody()
                    );
                }
            );
    }
public function updateCampaignAsyncWithHttpInfo ( $ campaign_id , $ list_id = null , $ template_id = null , $ from_email = null , $ from_name = null , $ subject = null , $ name = null , $ use_smart_sending = null , $ add_google_analytics = null ) { $ returnType = 'array<string,object>' ; $ request = $ this -> updateCampaignRequest ( $ campaign_id , $ list_id , $ template_id , $ from_email , $ from_name , $ subject , $ name , $ use_smart_sending , $ add_google_analytics ) ; return $ this -> client -> sendAsync ( $ request , $ this -> createHttpClientOption ( ) ) -> then ( function ( $ response ) use ( $ returnType ) { if ( $ returnType === '\SplFileObject' ) { $ content = $ response -> getBody ( ) ; } else { $ content = ( string ) $ response -> getBody ( ) ; } return [ ObjectSerializer :: deserialize ( $ content , $ returnType , [ ] ) , $ response -> getStatusCode ( ) , $ response -> getHeaders ( ) ] ; } , function ( $ exception ) { $ response = $ exception -> getResponse ( ) ; $ statusCode = $ response -> getStatusCode ( ) ; throw new ApiException ( sprintf ( '[%d] Error connecting to the API (%s)' , $ statusCode , $ exception -> getRequest ( ) -> getUri ( ) ) , $ statusCode , $ response -> getHeaders ( ) , ( string ) $ response -> getBody ( ) ) ; } ) ; }
Operation updateCampaignAsyncWithHttpInfo
 Update Campaign
Operation updateCampaignAsyncWithHttpInfo Update Campaign
//stream goes to serializer