lib/API/CampaignsApi.php
/**
     * Operation cloneCampaignAsyncWithHttpInfo
     *
     * Clone a Campaign
     *
     * @param  string $campaign_id (required)
     * @param  string $name The name for the new campaign. All other properties of the campaign will remain the same. Note, the template for the new campaign will be cloned from the existing template so changes to the existing campaign&#39;s content will not alter the content of the new campaign. (required)
     * @param  string $list_id The list you will send the campaign to. (required)
     *
     * @throws \InvalidArgumentException
     * @return \GuzzleHttp\Promise\PromiseInterface
     */
Operation cloneCampaignAsyncWithHttpInfo
Clone a Campaign

@param  string $campaign_id (required)
@param  string $name The name for the new campaign. All other properties of the campaign will remain the same. Note, the template for the new campaign will be cloned from the existing template so changes to the existing campaign's content will not alter the content of the new campaign. (required)
@param  string $list_id The list you will send the campaign to. (required)


Operation cloneCampaignAsyncWithHttpInfo Clone a Campaign @param string $campaign_id ( required ) @param string $name The name for the new campaign . All other properties of the campaign will remain the same . Note the template for the new campaign will be cloned from the existing template so changes to the existing campaign ' s content will not alter the content of the new campaign . ( required ) @param string $list_id The list you will send the campaign to . ( required )
public function cloneCampaignAsyncWithHttpInfo($campaign_id, $name, $list_id)
    {
        $returnType = 'array<string,object>';
        $request = $this->cloneCampaignRequest($campaign_id, $name, $list_id);
        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 cloneCampaignAsyncWithHttpInfo ( $ campaign_id , $ name , $ list_id ) { $ returnType = 'array<string,object>' ; $ request = $ this -> cloneCampaignRequest ( $ campaign_id , $ name , $ list_id ) ; 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 cloneCampaignAsyncWithHttpInfo
 Clone a Campaign
Operation cloneCampaignAsyncWithHttpInfo Clone a Campaign
//stream goes to serializer