1<?php 2/* 3 * Copyright 2014 Google Inc. 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 6 * use this file except in compliance with the License. You may obtain a copy of 7 * the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 * License for the specific language governing permissions and limitations under 15 * the License. 16 */ 17 18/** 19 * The "campaignCreativeAssociations" collection of methods. 20 * Typical usage is: 21 * <code> 22 * $dfareportingService = new Google_Service_Dfareporting(...); 23 * $campaignCreativeAssociations = $dfareportingService->campaignCreativeAssociations; 24 * </code> 25 */ 26class Google_Service_Dfareporting_Resource_CampaignCreativeAssociations extends Google_Service_Resource 27{ 28 /** 29 * Associates a creative with the specified campaign. This method creates a 30 * default ad with dimensions matching the creative in the campaign if such a 31 * default ad does not exist already. (campaignCreativeAssociations.insert) 32 * 33 * @param string $profileId User profile ID associated with this request. 34 * @param string $campaignId Campaign ID in this association. 35 * @param Google_Service_Dfareporting_CampaignCreativeAssociation $postBody 36 * @param array $optParams Optional parameters. 37 * @return Google_Service_Dfareporting_CampaignCreativeAssociation 38 */ 39 public function insert($profileId, $campaignId, Google_Service_Dfareporting_CampaignCreativeAssociation $postBody, $optParams = array()) 40 { 41 $params = array('profileId' => $profileId, 'campaignId' => $campaignId, 'postBody' => $postBody); 42 $params = array_merge($params, $optParams); 43 return $this->call('insert', array($params), "Google_Service_Dfareporting_CampaignCreativeAssociation"); 44 } 45 /** 46 * Retrieves the list of creative IDs associated with the specified campaign. 47 * This method supports paging. 48 * (campaignCreativeAssociations.listCampaignCreativeAssociations) 49 * 50 * @param string $profileId User profile ID associated with this request. 51 * @param string $campaignId Campaign ID in this association. 52 * @param array $optParams Optional parameters. 53 * 54 * @opt_param int maxResults Maximum number of results to return. 55 * @opt_param string pageToken Value of the nextPageToken from the previous 56 * result page. 57 * @opt_param string sortOrder Order of sorted results. 58 * @return Google_Service_Dfareporting_CampaignCreativeAssociationsListResponse 59 */ 60 public function listCampaignCreativeAssociations($profileId, $campaignId, $optParams = array()) 61 { 62 $params = array('profileId' => $profileId, 'campaignId' => $campaignId); 63 $params = array_merge($params, $optParams); 64 return $this->call('list', array($params), "Google_Service_Dfareporting_CampaignCreativeAssociationsListResponse"); 65 } 66} 67