Skip to content

Commit

Permalink
Preparing src for release 5.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Ray Tsang committed Apr 11, 2014
1 parent 09b3415 commit a89adc6
Show file tree
Hide file tree
Showing 25 changed files with 9,356 additions and 19 deletions.
9 changes: 9 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
### 5.2.3

AdWords:
- Added support for new AdWords Express ProductServiceService.
- Fixed [issue #2](https://github.com/googleads/googleads-php-lib/issues/2).

DFP:
- Fixed [issue #32](https://github.com/googleads/googleads-php-lib/issues/32).

### 5.2.2

AdWords:
Expand Down
96 changes: 96 additions & 0 deletions examples/AdWords/v201309/Express/GetProductServices.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<?php
/**
* This example shows how to retrieve AdWords Express product/service objects
* related to specific criteria.
*
* Tags: ProductServiceService.get
*
* Copyright 2014, Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @package GoogleApiAdsAdWords
* @subpackage v201309
* @category WebServices
* @copyright 2014, Google Inc. All Rights Reserved.
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License,
* Version 2.0
* @author Josh Radcliff
*/

// Include the initialization file
require_once dirname(dirname(__FILE__)) . '/init.php';

// Enter parameters required by the code example.
$productServiceSuggestion = 'INSERT_PRODUCT_SERVICE_SUGGESTION_HERE';
$localeText = 'INSERT_LOCALE_TEXT_HERE';

/**
* Runs the example.
* @param AdWordsUser $user the user to run the example with
*/
function GetProductServicesExample(AdWordsUser $user, $productServiceSuggestion,
$localeText) {
// Get the service, which loads the required classes.
$productServiceService = $user->GetService('ProductServiceService',
ADWORDS_VERSION);

// Create selector.
$selector = new Selector();
$selector->fields = array('ProductServiceText');

// Create predicates.
$selector->predicates[] = new Predicate('ProductServiceText', 'EQUALS',
array($productServiceSuggestion));
$selector->predicates[] = new Predicate('Locale', 'EQUALS',
array($localeText));

// Create paging controls.
$selector->paging = new Paging(0, AdWordsConstants::RECOMMENDED_PAGE_SIZE);

do {
// Make the get request.
$page = $productServiceService->get($selector);

// Display results.
if (isset($page->entries)) {
foreach ($page->entries as $productService) {
printf("Product/service with text '%s' found\n", $productService->text);
}
} else {
print "No products/services were found.\n";
}

// Advance the paging index.
$selector->paging->startIndex += AdWordsConstants::RECOMMENDED_PAGE_SIZE;
} while ($page->totalNumEntries > $selector->paging->startIndex);
}

// Don't run the example if the file is being included.
if (__FILE__ != realpath($_SERVER['PHP_SELF'])) {
return;
}

try {
// Get AdWordsUser from credentials in "../auth.ini"
// relative to the AdWordsUser.php file's directory.
$user = new AdWordsUser();

// Log every SOAP XML request and response.
$user->LogAll();

// Run the example.
GetProductServicesExample($user, $productServiceSuggestion, $localeText);
} catch (Exception $e) {
printf("An error has occurred: %s\n", $e->getMessage());
}
96 changes: 96 additions & 0 deletions examples/AdWords/v201402/Express/GetProductServices.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<?php
/**
* This example shows how to retrieve AdWords Express product/service objects
* related to specific criteria.
*
* Tags: ProductServiceService.get
*
* Copyright 2014, Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @package GoogleApiAdsAdWords
* @subpackage v201402
* @category WebServices
* @copyright 2014, Google Inc. All Rights Reserved.
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License,
* Version 2.0
* @author Josh Radcliff
*/

// Include the initialization file
require_once dirname(dirname(__FILE__)) . '/init.php';

// Enter parameters required by the code example.
$productServiceSuggestion = 'INSERT_PRODUCT_SERVICE_SUGGESTION_HERE';
$localeText = 'INSERT_LOCALE_TEXT_HERE';

/**
* Runs the example.
* @param AdWordsUser $user the user to run the example with
*/
function GetProductServicesExample(AdWordsUser $user, $productServiceSuggestion,
$localeText) {
// Get the service, which loads the required classes.
$productServiceService = $user->GetService('ProductServiceService',
ADWORDS_VERSION);

// Create selector.
$selector = new Selector();
$selector->fields = array('ProductServiceText');

// Create predicates.
$selector->predicates[] = new Predicate('ProductServiceText', 'EQUALS',
array($productServiceSuggestion));
$selector->predicates[] = new Predicate('Locale', 'EQUALS',
array($localeText));

// Create paging controls.
$selector->paging = new Paging(0, AdWordsConstants::RECOMMENDED_PAGE_SIZE);

do {
// Make the get request.
$page = $productServiceService->get($selector);

// Display results.
if (isset($page->entries)) {
foreach ($page->entries as $productService) {
printf("Product/service with text '%s' found\n", $productService->text);
}
} else {
print "No products/services were found.\n";
}

// Advance the paging index.
$selector->paging->startIndex += AdWordsConstants::RECOMMENDED_PAGE_SIZE;
} while ($page->totalNumEntries > $selector->paging->startIndex);
}

// Don't run the example if the file is being included.
if (__FILE__ != realpath($_SERVER['PHP_SELF'])) {
return;
}

try {
// Get AdWordsUser from credentials in "../auth.ini"
// relative to the AdWordsUser.php file's directory.
$user = new AdWordsUser();

// Log every SOAP XML request and response.
$user->LogAll();

// Run the example.
GetProductServicesExample($user, $productServiceSuggestion, $localeText);
} catch (Exception $e) {
printf("An error has occurred: %s\n", $e->getMessage());
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
// Create the creative set on the server.
$creativeSets = $creativeSetService->createCreativeSets(array($creativeSet));

foreach ($creativeSets as $creativeSet)
foreach ($creativeSets as $creativeSet) {
printf ("A creative set with ID '%s', name '%s', master creative ID '%s' "
. ", and companion creativeID(s) {%s} was created.\n",
$creativeSet->id, $creativeSet->name, $creativeSet->masterCreativeId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
// Create the ad unit on the server.
$adUnits = $inventoryService->createAdUnits(array($adUnit));

foreach ($adUnits as $adUnit)
foreach ($adUnits as $adUnit) {
printf("An ad unit with ID '%s' was created under parent with ID '%s'.\n",
$adUnit->id, $adUnit->parentId);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
// Create the ad unit on the server.
$adUnits = $inventoryService->createAdUnits(array($adUnit));

foreach ($adUnits as $adUnit)
foreach ($adUnits as $adUnit) {
printf("An ad unit with ID '%s' was created under parent with ID '%s'.\n",
$adUnit->id, $adUnit->parentId);
}
Expand Down
6 changes: 4 additions & 2 deletions src/Google/Api/Ads/AdWords/Lib/api.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ api.soapClientClassNamespace=Google_Api_Ads_AdWords_Lib

;; v201309
api.versions.v201309.namespace=Google_Api_Ads_AdWords_v201309
api.versions.v201309.services=AdGroupAdService,AdGroupBidModifierService,AdGroupCriterionService,AdGroupFeedService,AdGroupService,AdParamService,AdwordsUserListService,AlertService,BiddingStrategyService,BudgetOrderService,BudgetService,CampaignAdExtensionService,CampaignCriterionService,CampaignFeedService,CampaignService,CampaignSharedSetService,ConstantDataService,ConversionTrackerService,CustomerService,CustomerSyncService,DataService,ExperimentService,FeedItemService,FeedMappingService,FeedService,GeoLocationService,LocationCriterionService,ManagedCustomerService,MediaService,MutateJobService,OfflineConversionFeedService,ReportDefinitionService,SharedCriterionService,SharedSetService,TargetingIdeaService,TrafficEstimatorService,ExpressBusinessService,PromotionService
api.versions.v201309.services=AdGroupAdService,AdGroupBidModifierService,AdGroupCriterionService,AdGroupFeedService,AdGroupService,AdParamService,AdwordsUserListService,AlertService,BiddingStrategyService,BudgetOrderService,BudgetService,CampaignAdExtensionService,CampaignCriterionService,CampaignFeedService,CampaignService,CampaignSharedSetService,ConstantDataService,ConversionTrackerService,CustomerService,CustomerSyncService,DataService,ExperimentService,FeedItemService,FeedMappingService,FeedService,GeoLocationService,LocationCriterionService,ManagedCustomerService,MediaService,MutateJobService,OfflineConversionFeedService,ReportDefinitionService,SharedCriterionService,SharedSetService,TargetingIdeaService,TrafficEstimatorService,ExpressBusinessService,ProductServiceService,PromotionService
api.versions.v201309.services.AdGroupAdService.wsdl=${api.server}/api/adwords/cm/v201309/AdGroupAdService?wsdl
api.versions.v201309.services.AdGroupBidModifierService.wsdl=${api.server}/api/adwords/cm/v201309/AdGroupBidModifierService?wsdl
api.versions.v201309.services.AdGroupCriterionService.wsdl=${api.server}/api/adwords/cm/v201309/AdGroupCriterionService?wsdl
Expand Down Expand Up @@ -56,6 +56,7 @@ api.versions.v201309.services.ManagedCustomerService.wsdl=${api.server}/api/adwo
api.versions.v201309.services.MediaService.wsdl=${api.server}/api/adwords/cm/v201309/MediaService?wsdl
api.versions.v201309.services.MutateJobService.wsdl=${api.server}/api/adwords/cm/v201309/MutateJobService?wsdl
api.versions.v201309.services.OfflineConversionFeedService.wsdl=${api.server}/api/adwords/cm/v201309/OfflineConversionFeedService?wsdl
api.versions.v201309.services.ProductServiceService.wsdl=${api.server}/api/adwords/express/v201309/ProductServiceService?wsdl
api.versions.v201309.services.PromotionService.wsdl=${api.server}/api/adwords/express/v201309/PromotionService?wsdl
api.versions.v201309.services.ReportDefinitionService.wsdl=${api.server}/api/adwords/cm/v201309/ReportDefinitionService?wsdl
api.versions.v201309.services.SharedCriterionService.wsdl=${api.server}/api/adwords/cm/v201309/SharedCriterionService?wsdl
Expand All @@ -65,7 +66,7 @@ api.versions.v201309.services.TrafficEstimatorService.wsdl=${api.server}/api/adw

;; v201402
api.versions.v201402.namespace=Google_Api_Ads_AdWords_v201402
api.versions.v201402.services=AdGroupAdService,AdGroupBidModifierService,AdGroupCriterionService,AdGroupFeedService,AdGroupService,AdParamService,AdwordsUserListService,AlertService,BiddingStrategyService,BudgetOrderService,BudgetService,CampaignAdExtensionService,CampaignCriterionService,CampaignFeedService,CampaignService,ConstantDataService,ConversionTrackerService,CustomerFeedService,CustomerService,CustomerSyncService,DataService,ExperimentService,FeedItemService,FeedMappingService,FeedService,GeoLocationService,LocationCriterionService,ManagedCustomerService,MediaService,MutateJobService,OfflineConversionFeedService,ReportDefinitionService,TargetingIdeaService,TrafficEstimatorService,ExpressBusinessService,PromotionService
api.versions.v201402.services=AdGroupAdService,AdGroupBidModifierService,AdGroupCriterionService,AdGroupFeedService,AdGroupService,AdParamService,AdwordsUserListService,AlertService,BiddingStrategyService,BudgetOrderService,BudgetService,CampaignAdExtensionService,CampaignCriterionService,CampaignFeedService,CampaignService,ConstantDataService,ConversionTrackerService,CustomerFeedService,CustomerService,CustomerSyncService,DataService,ExperimentService,FeedItemService,FeedMappingService,FeedService,GeoLocationService,LocationCriterionService,ManagedCustomerService,MediaService,MutateJobService,OfflineConversionFeedService,ReportDefinitionService,TargetingIdeaService,TrafficEstimatorService,ExpressBusinessService,ProductServiceService,PromotionService
api.versions.v201402.services.AdGroupAdService.wsdl=${api.server}/api/adwords/cm/v201402/AdGroupAdService?wsdl
api.versions.v201402.services.AdGroupBidModifierService.wsdl=${api.server}/api/adwords/cm/v201402/AdGroupBidModifierService?wsdl
api.versions.v201402.services.AdGroupCriterionService.wsdl=${api.server}/api/adwords/cm/v201402/AdGroupCriterionService?wsdl
Expand Down Expand Up @@ -98,6 +99,7 @@ api.versions.v201402.services.ManagedCustomerService.wsdl=${api.server}/api/adwo
api.versions.v201402.services.MediaService.wsdl=${api.server}/api/adwords/cm/v201402/MediaService?wsdl
api.versions.v201402.services.MutateJobService.wsdl=${api.server}/api/adwords/cm/v201402/MutateJobService?wsdl
api.versions.v201402.services.OfflineConversionFeedService.wsdl=${api.server}/api/adwords/cm/v201402/OfflineConversionFeedService?wsdl
api.versions.v201402.services.ProductServiceService.wsdl=${api.server}/api/adwords/express/v201402/ProductServiceService?wsdl
api.versions.v201402.services.PromotionService.wsdl=${api.server}/api/adwords/express/v201402/PromotionService?wsdl
api.versions.v201402.services.ReportDefinitionService.wsdl=${api.server}/api/adwords/cm/v201402/ReportDefinitionService?wsdl
api.versions.v201402.services.TargetingIdeaService.wsdl=${api.server}/api/adwords/o/v201402/TargetingIdeaService?wsdl
Expand Down
11 changes: 11 additions & 0 deletions src/Google/Api/Ads/AdWords/settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@ WSDL_CACHE = 0
; of HTTP 1.1 chunked data properly.
; FORCE_HTTP_VERSION = "<HTTP VERSION>"

; Forces SOAP requests to add the XSI types or not. Different PHP versions
; on different platforms may need to set to true or false.
; If not set, the client library will default to 0 (false), except for the
; following:
; - PHP < 5.2.6 on any OS will be set to 1 (true) when this setting is not set
; - PHP < 5.3.0 on Darwin OS will be set to 1 (true) when this setting is not
; set
; If you are receiving "Unmarshalling Error", uncomment the following setting
; and set it to either 0 (false) or 1 (true).
; FORCE_ADD_XSI_TYPES = 1;

[PROXY]
; Proxy settings to be used by HTTP (and therefore SOAP) requests.
; HOST = "<HOST>"
Expand Down
2 changes: 2 additions & 0 deletions src/Google/Api/Ads/AdWords/v201309/CampaignFeedService.php
Original file line number Diff line number Diff line change
Expand Up @@ -3447,6 +3447,7 @@ public function __construct($rval = null) {
* <span class="constraint ContentsNotNull">This field must not contain {@code null} elements.</span>
* <span class="constraint NotEmpty">This field must contain at least one element.</span>
* <span class="constraint Required">This field is required and should not be {@code null}.</span>
* <span class="constraint SupportedOperators">The following {@link Operator}s are supported: ADD, SET, REMOVE.</span>
*
*
*
Expand Down Expand Up @@ -4042,6 +4043,7 @@ public function get($selector) {
* <span class="constraint ContentsNotNull">This field must not contain {@code null} elements.</span>
* <span class="constraint NotEmpty">This field must contain at least one element.</span>
* <span class="constraint Required">This field is required and should not be {@code null}.</span>
* <span class="constraint SupportedOperators">The following {@link Operator}s are supported: ADD, SET, REMOVE.</span>
*
*
*
Expand Down
Loading

0 comments on commit a89adc6

Please sign in to comment.