Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
52ba310
Generated clients with non-final service client classes for v16 and v…
fiboknacky Jun 17, 2024
4931e68
Update the gRPC installation guide link
fiboknacky Jun 21, 2024
66cab41
Added support for REST HTTP handler. (#1035)
fiboknacky Jun 28, 2024
a570ae7
Changes for release v17_1. (#1040)
fiboknacky Aug 9, 2024
3578669
Release for v24.0.0.
fiboknacky Aug 9, 2024
6e8cbad
Updated HandlePartialFailure and HandleRateExceededError to use the G…
fiboknacky Sep 11, 2024
7216a85
Fixed the request objects of the Laravel sample app to use GAPIC v2. …
fiboknacky Sep 12, 2024
4615ac7
Removed the use of "useGapicV2Source" from all examples (#1047)
fiboknacky Sep 27, 2024
b8ccf91
Changes for release v18. (#1052)
fiboknacky Oct 18, 2024
6f37249
Release for v25.0.0.
fiboknacky Oct 18, 2024
aa08607
Added support for PHP 8.4. (#1059)
fiboknacky Dec 12, 2024
c875cbd
Updated InfoRedactor to remove non PHP 7.4 code. (#1060)
fiboknacky Dec 13, 2024
f73e7d8
Removed support for v16. (#1066)
fiboknacky Jan 27, 2025
913e27d
Updated CHANGELOG.md for releasing lib version v26.0.0. (#1069)
fiboknacky Feb 5, 2025
8a0447f
Changes for release v19. (#1075)
fiboknacky Feb 27, 2025
9a21c25
Release for v26.1.0.
fiboknacky Feb 27, 2025
6a29f6d
Remove the reference for setting Customer Match membership to no expi…
yangda Mar 12, 2025
063196e
Changes for release V19_1. (#1079)
Brothman Apr 18, 2025
b8db902
Update CHANGELOG.md
Brothman Apr 18, 2025
71f333e
Release for v26.2.0.
Brothman Apr 18, 2025
80f5410
Changes for release v27.2.0 to remove v17 support. (#1082)
Brothman May 14, 2025
dc771d8
Release for v27.2.0.
Brothman May 14, 2025
9dfeca3
Changes for release V28.0.0. (#1088)
Raibaz Jun 4, 2025
e336612
Revert a change that was causing unit tests to fail (#1089)
Raibaz Jun 4, 2025
8313484
Release for v28.0.0.
Raibaz Jun 4, 2025
cec2ea8
Merge remote-tracking branch 'refs/remotes/upstream/main' into latest
masabni-insider Jun 10, 2025
7802bf2
Merge branch 'googleads:main' into latest
masabni-insider Jun 11, 2025
8f11f72
feat: add Google Ads API v23 support (PHP 7.4 backport)
Xicy Jun 25, 2026
de3ddb1
feat: add Google Ads API v23 support (PHP 7.4 backport)
Xicy Jun 26, 2026
e31502d
Merge branch 'feature/SD-144677' into latest
Xicy Jun 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ language: php
php:
- 8.1
- 8.2
- 8.3
- 8.4
- nightly

matrix:
allow_failures:
- php: 8.4
- php: nightly

branches:
Expand Down
36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,39 @@
## 28.0.0
* Compatibility with v20.0 of the API: https://developers.google.com/google-ads/api/docs/release-notes

## 27.2.0
* Removed support for v17 of the API: https://ads-developers.googleblog.com/2025/04/google-ads-api-v17-sunset-reminder.html

## 26.2.0
* Compatibility with v19.1 of the API: https://developers.google.com/google-ads/api/docs/release-notes

## 26.1.0
* Added support for v19 of Google Ads API.
* Removed support for Feed-related classes, fields and enums in v19.
* Updated code examples:
* AddPerformanceMaxCampaign
* AddPerformanceMaxRetailCampaign
* AddShoppingProductAd
* GetChangeDetails

## 26.0.0
* Removed support for v16 of Google Ads API.

## 25.0.0
* Added support for v18 of Google Ads API.
* Removed support for the `useGapicV2Source` configuration, as the source code
of all versions are generated as GAPIC v2.
* Fixed the LaravelSampleApp to use GAPIC v2.
* Updated code examples:
* GetAllDisapprovedAds
* HandlePartialFailure

## 24.0.0
* Added support for v17_1 of Google Ads API.
* Removed support for v15 of Google Ads API.
* Made service client classes non-final.
* Added support for setting a REST handler as a client option for each call.

## 23.1.0
* Added support for v17 of Google Ads API.
* Updated code examples for removing the usage of `pageSize`:
Expand Down
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Google Ads API v14 is [scheduled to be sunset by the end of May 2024](https://de
[composer.json](composer.json) of this library.
* **PHP**: You can find the required minimum PHP version in `"php"` under the [**`require`**](https://getcomposer.org/doc/01-basic-usage.md#the-require-key) key of [`composer.json`](composer.json). We usually set it to the minimum PHP version for which the PHP development team still provide security fixes. Whenever such a version is sunset, we'll update the composer file accordingly. Currently, the update frequency is around once a year based on the [official schedule](https://www.php.net/supported-versions.php).
Visit [this page](https://www.php.net/manual/en/getting-started.php) for introduction to PHP.
* **gRPC**: To install the gRPC PHP extension, make sure to meet any additional requirements listed in the project's [**documentation**](https://grpc.io/docs/languages/php/quickstart/#prerequisites). You can learn more about how gRPC is used by this library by reading our [Transport](https://developers.google.com/google-ads/api/docs/client-libs/php/transport) guide. It usually take minutes to install using `PECL`:
* **gRPC**: To install the gRPC PHP extension, make sure to meet any additional requirements listed in the project's [**documentation**](https://cloud.google.com/php/grpc#installing_the_grpc_extension). You can learn more about how gRPC is used by this library by reading our [Transport](https://developers.google.com/google-ads/api/docs/client-libs/php/transport) guide. It usually take minutes to install using `PECL`:
1. Install the extension using the command `sudo pecl install grpc`.
1. Add a line `extension=grpc.so` to the `php.ini` file.
1. Run `php -i | grep grpc` in a terminal: it is well installed
Expand Down Expand Up @@ -142,7 +142,7 @@ Follow the below steps if you want to try our code examples.
### Instantiate a client

To issue requests via the Google Ads API, you first need to create a
[GoogleAdsClient](https://github.com/googleads/google-ads-php/blob/HEAD/src/Google/Ads/GoogleAds/Lib/V17/GoogleAdsClient.php).
[GoogleAdsClient](https://github.com/googleads/google-ads-php/blob/HEAD/src/Google/Ads/GoogleAds/Lib/V20/GoogleAdsClient.php).

For more information on how to configure a client when instantiating it, see the
[configuration guide](https://developers.google.com/google-ads/api/docs/client-libs/php/configuration).
Expand All @@ -152,12 +152,6 @@ For more information on how to configure a client when instantiating it, see the
Once you have an instance of `GoogleAdsClient`, you can obtain a service client
for a particular service using one of the `get...ServiceClient()` methods.

The created service client can be either GAPIC (Generated API Client) v1 or v2 source code, based
on the value of the `useGapicV2Source` configuration.
See [GAPIC](https://developers.devsite.corp.google.com/google-ads/api/docs/client-libs/php/gapic)
and [Configuration fields](https://developers.devsite.corp.google.com/google-ads/api/docs/client-libs/php/configuration#config-field)
for details.

## Client configuration

See the [Configuration guide](https://developers.google.com/google-ads/api/docs/client-libs/php/configuration).
Expand Down
18 changes: 6 additions & 12 deletions examples/AccountManagement/CreateCustomer.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
use GetOpt\GetOpt;
use Google\Ads\GoogleAds\Examples\Utils\ArgumentNames;
use Google\Ads\GoogleAds\Examples\Utils\ArgumentParser;
use Google\Ads\GoogleAds\Lib\V17\GoogleAdsClient;
use Google\Ads\GoogleAds\Lib\V17\GoogleAdsClientBuilder;
use Google\Ads\GoogleAds\Lib\V17\GoogleAdsException;
use Google\Ads\GoogleAds\Lib\V20\GoogleAdsClient;
use Google\Ads\GoogleAds\Lib\V20\GoogleAdsClientBuilder;
use Google\Ads\GoogleAds\Lib\V20\GoogleAdsException;
use Google\Ads\GoogleAds\Lib\OAuth2TokenBuilder;
use Google\Ads\GoogleAds\V17\Errors\GoogleAdsError;
use Google\Ads\GoogleAds\V17\Resources\Customer;
use Google\Ads\GoogleAds\V17\Services\CreateCustomerClientRequest;
use Google\Ads\GoogleAds\V20\Errors\GoogleAdsError;
use Google\Ads\GoogleAds\V20\Resources\Customer;
use Google\Ads\GoogleAds\V20\Services\CreateCustomerClientRequest;
use Google\ApiCore\ApiException;

/**
Expand Down Expand Up @@ -57,12 +57,6 @@ public static function main()
// OAuth2 credentials above.
$googleAdsClient = (new GoogleAdsClientBuilder())->fromFile()
->withOAuth2Credential($oAuth2Credential)
// We set this value to true to show how to use GAPIC v2 source code. You can remove the
// below line if you wish to use the old-style source code. Note that in that case, you
// probably need to modify some parts of the code below to make it work.
// For more information, see
// https://developers.devsite.corp.google.com/google-ads/api/docs/client-libs/php/gapic.
->usingGapicV2Source(true)
->build();

try {
Expand Down
32 changes: 10 additions & 22 deletions examples/AccountManagement/GetAccountHierarchy.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@
use Google\Ads\GoogleAds\Examples\Utils\ArgumentNames;
use Google\Ads\GoogleAds\Examples\Utils\ArgumentParser;
use Google\Ads\GoogleAds\Lib\OAuth2TokenBuilder;
use Google\Ads\GoogleAds\Lib\V17\GoogleAdsClient;
use Google\Ads\GoogleAds\Lib\V17\GoogleAdsClientBuilder;
use Google\Ads\GoogleAds\Lib\V17\GoogleAdsException;
use Google\Ads\GoogleAds\Lib\V17\GoogleAdsServerStreamDecorator;
use Google\Ads\GoogleAds\V17\Errors\GoogleAdsError;
use Google\Ads\GoogleAds\V17\Resources\CustomerClient;
use Google\Ads\GoogleAds\V17\Services\CustomerServiceClient;
use Google\Ads\GoogleAds\V17\Services\GoogleAdsRow;
use Google\Ads\GoogleAds\V17\Services\ListAccessibleCustomersRequest;
use Google\Ads\GoogleAds\V17\Services\SearchGoogleAdsStreamRequest;
use Google\Ads\GoogleAds\Lib\V20\GoogleAdsClient;
use Google\Ads\GoogleAds\Lib\V20\GoogleAdsClientBuilder;
use Google\Ads\GoogleAds\Lib\V20\GoogleAdsException;
use Google\Ads\GoogleAds\Lib\V20\GoogleAdsServerStreamDecorator;
use Google\Ads\GoogleAds\V20\Errors\GoogleAdsError;
use Google\Ads\GoogleAds\V20\Resources\CustomerClient;
use Google\Ads\GoogleAds\V20\Services\CustomerServiceClient;
use Google\Ads\GoogleAds\V20\Services\GoogleAdsRow;
use Google\Ads\GoogleAds\V20\Services\ListAccessibleCustomersRequest;
use Google\Ads\GoogleAds\V20\Services\SearchGoogleAdsStreamRequest;
use Google\ApiCore\ApiException;

/**
Expand Down Expand Up @@ -85,12 +85,6 @@ public static function main()
// OAuth2 credentials above.
$googleAdsClient = (new GoogleAdsClientBuilder())->fromFile()
->withOAuth2Credential($oAuth2Credential)
// We set this value to true to show how to use GAPIC v2 source code. You can remove the
// below line if you wish to use the old-style source code. Note that in that case, you
// probably need to modify some parts of the code below to make it work.
// For more information, see
// https://developers.devsite.corp.google.com/google-ads/api/docs/client-libs/php/gapic.
->usingGapicV2Source(true)
->build();

try {
Expand Down Expand Up @@ -210,12 +204,6 @@ private static function createCustomerClientToHierarchy(
$googleAdsClient = (new GoogleAdsClientBuilder())->fromFile()
->withOAuth2Credential($oAuth2Credential)
->withLoginCustomerId($loginCustomerId ?? $rootCustomerId)
// We set this value to true to show how to use GAPIC v2 source code. You can remove the
// below line if you wish to use the old-style source code. Note that in that case, you
// probably need to modify some parts of the code below to make it work.
// For more information, see
// https://developers.devsite.corp.google.com/google-ads/api/docs/client-libs/php/gapic.
->usingGapicV2Source(true)
->build();

// Creates the Google Ads Service client.
Expand Down
40 changes: 9 additions & 31 deletions examples/AccountManagement/GetChangeDetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@
use Google\Ads\GoogleAds\Examples\Utils\ArgumentNames;
use Google\Ads\GoogleAds\Examples\Utils\ArgumentParser;
use Google\Ads\GoogleAds\Lib\OAuth2TokenBuilder;
use Google\Ads\GoogleAds\Lib\V17\GoogleAdsClient;
use Google\Ads\GoogleAds\Lib\V17\GoogleAdsClientBuilder;
use Google\Ads\GoogleAds\Lib\V17\GoogleAdsException;
use Google\Ads\GoogleAds\Lib\V20\GoogleAdsClient;
use Google\Ads\GoogleAds\Lib\V20\GoogleAdsClientBuilder;
use Google\Ads\GoogleAds\Lib\V20\GoogleAdsException;
use Google\Ads\GoogleAds\Util\FieldMasks;
use Google\Ads\GoogleAds\V17\Enums\ChangeClientTypeEnum\ChangeClientType;
use Google\Ads\GoogleAds\V17\Enums\ChangeEventResourceTypeEnum\ChangeEventResourceType;
use Google\Ads\GoogleAds\V17\Enums\ResourceChangeOperationEnum\ResourceChangeOperation;
use Google\Ads\GoogleAds\V17\Errors\GoogleAdsError;
use Google\Ads\GoogleAds\V17\Services\GoogleAdsRow;
use Google\Ads\GoogleAds\V17\Services\SearchGoogleAdsRequest;
use Google\Ads\GoogleAds\V20\Enums\ChangeClientTypeEnum\ChangeClientType;
use Google\Ads\GoogleAds\V20\Enums\ChangeEventResourceTypeEnum\ChangeEventResourceType;
use Google\Ads\GoogleAds\V20\Enums\ResourceChangeOperationEnum\ResourceChangeOperation;
use Google\Ads\GoogleAds\V20\Errors\GoogleAdsError;
use Google\Ads\GoogleAds\V20\Services\GoogleAdsRow;
use Google\Ads\GoogleAds\V20\Services\SearchGoogleAdsRequest;
use Google\ApiCore\ApiException;
use Google\Protobuf\Internal\Message;
use Google\Protobuf\Internal\RepeatedField;
Expand Down Expand Up @@ -62,12 +62,6 @@ public static function main()
// OAuth2 credentials above.
$googleAdsClient = (new GoogleAdsClientBuilder())->fromFile()
->withOAuth2Credential($oAuth2Credential)
// We set this value to true to show how to use GAPIC v2 source code. You can remove the
// below line if you wish to use the old-style source code. Note that in that case, you
// probably need to modify some parts of the code below to make it work.
// For more information, see
// https://developers.devsite.corp.google.com/google-ads/api/docs/client-libs/php/gapic.
->usingGapicV2Source(true)
->build();

try {
Expand Down Expand Up @@ -210,26 +204,10 @@ public static function runExample(GoogleAdsClient $googleAdsClient, int $custome
$oldResourceEntity = $oldResource->getCampaignCriterion();
$newResourceEntity = $newResource->getCampaignCriterion();
break;
case ChangeEventResourceType::AD_GROUP_FEED:
$oldResourceEntity = $oldResource->getAdGroupFeed();
$newResourceEntity = $newResource->getAdGroupFeed();
break;
case ChangeEventResourceType::CAMPAIGN_FEED:
$oldResourceEntity = $oldResource->getCampaignFeed();
$newResourceEntity = $newResource->getCampaignFeed();
break;
case ChangeEventResourceType::CUSTOMER_ASSET:
$oldResourceEntity = $oldResource->getCustomerAsset();
$newResourceEntity = $newResource->getCustomerAsset();
break;
case ChangeEventResourceType::FEED:
$oldResourceEntity = $oldResource->getFeed();
$newResourceEntity = $newResource->getFeed();
break;
case ChangeEventResourceType::FEED_ITEM:
$oldResourceEntity = $oldResource->getFeedItem();
$newResourceEntity = $newResource->getFeedItem();
break;
default:
$isResourceTypeKnown = false;
break;
Expand Down
24 changes: 9 additions & 15 deletions examples/AccountManagement/GetChangeSummary.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@
use GetOpt\GetOpt;
use Google\Ads\GoogleAds\Examples\Utils\ArgumentNames;
use Google\Ads\GoogleAds\Examples\Utils\ArgumentParser;
use Google\Ads\GoogleAds\Lib\V17\GoogleAdsClient;
use Google\Ads\GoogleAds\Lib\V17\GoogleAdsClientBuilder;
use Google\Ads\GoogleAds\Lib\V17\GoogleAdsException;
use Google\Ads\GoogleAds\Lib\V20\GoogleAdsClient;
use Google\Ads\GoogleAds\Lib\V20\GoogleAdsClientBuilder;
use Google\Ads\GoogleAds\Lib\V20\GoogleAdsException;
use Google\Ads\GoogleAds\Lib\OAuth2TokenBuilder;
use Google\Ads\GoogleAds\V17\Enums\ChangeStatusOperationEnum\ChangeStatusOperation;
use Google\Ads\GoogleAds\V17\Enums\ChangeStatusResourceTypeEnum\ChangeStatusResourceType;
use Google\Ads\GoogleAds\V17\Errors\GoogleAdsError;
use Google\Ads\GoogleAds\V17\Resources\ChangeStatus;
use Google\Ads\GoogleAds\V17\Services\GoogleAdsRow;
use Google\Ads\GoogleAds\V17\Services\SearchGoogleAdsRequest;
use Google\Ads\GoogleAds\V20\Enums\ChangeStatusOperationEnum\ChangeStatusOperation;
use Google\Ads\GoogleAds\V20\Enums\ChangeStatusResourceTypeEnum\ChangeStatusResourceType;
use Google\Ads\GoogleAds\V20\Errors\GoogleAdsError;
use Google\Ads\GoogleAds\V20\Resources\ChangeStatus;
use Google\Ads\GoogleAds\V20\Services\GoogleAdsRow;
use Google\Ads\GoogleAds\V20\Services\SearchGoogleAdsRequest;
use Google\ApiCore\ApiException;

/**
Expand All @@ -57,12 +57,6 @@ public static function main()
// OAuth2 credentials above.
$googleAdsClient = (new GoogleAdsClientBuilder())->fromFile()
->withOAuth2Credential($oAuth2Credential)
// We set this value to true to show how to use GAPIC v2 source code. You can remove the
// below line if you wish to use the old-style source code. Note that in that case, you
// probably need to modify some parts of the code below to make it work.
// For more information, see
// https://developers.devsite.corp.google.com/google-ads/api/docs/client-libs/php/gapic.
->usingGapicV2Source(true)
->build();

try {
Expand Down
22 changes: 8 additions & 14 deletions examples/AccountManagement/InviteUserWithAccessRole.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
use Google\Ads\GoogleAds\Examples\Utils\ArgumentNames;
use Google\Ads\GoogleAds\Examples\Utils\ArgumentParser;
use Google\Ads\GoogleAds\Lib\OAuth2TokenBuilder;
use Google\Ads\GoogleAds\Lib\V17\GoogleAdsClient;
use Google\Ads\GoogleAds\Lib\V17\GoogleAdsClientBuilder;
use Google\Ads\GoogleAds\Lib\V17\GoogleAdsException;
use Google\Ads\GoogleAds\V17\Enums\AccessRoleEnum\AccessRole;
use Google\Ads\GoogleAds\V17\Errors\GoogleAdsError;
use Google\Ads\GoogleAds\V17\Resources\CustomerUserAccessInvitation;
use Google\Ads\GoogleAds\V17\Services\CustomerUserAccessInvitationOperation;
use Google\Ads\GoogleAds\V17\Services\MutateCustomerUserAccessInvitationRequest;
use Google\Ads\GoogleAds\Lib\V20\GoogleAdsClient;
use Google\Ads\GoogleAds\Lib\V20\GoogleAdsClientBuilder;
use Google\Ads\GoogleAds\Lib\V20\GoogleAdsException;
use Google\Ads\GoogleAds\V20\Enums\AccessRoleEnum\AccessRole;
use Google\Ads\GoogleAds\V20\Errors\GoogleAdsError;
use Google\Ads\GoogleAds\V20\Resources\CustomerUserAccessInvitation;
use Google\Ads\GoogleAds\V20\Services\CustomerUserAccessInvitationOperation;
use Google\Ads\GoogleAds\V20\Services\MutateCustomerUserAccessInvitationRequest;
use Google\ApiCore\ApiException;

/**
Expand Down Expand Up @@ -65,12 +65,6 @@ public static function main()
// OAuth2 credentials above.
$googleAdsClient = (new GoogleAdsClientBuilder())->fromFile()
->withOAuth2Credential($oAuth2Credential)
// We set this value to true to show how to use GAPIC v2 source code. You can remove the
// below line if you wish to use the old-style source code. Note that in that case, you
// probably need to modify some parts of the code below to make it work.
// For more information, see
// https://developers.devsite.corp.google.com/google-ads/api/docs/client-libs/php/gapic.
->usingGapicV2Source(true)
->build();

try {
Expand Down
32 changes: 13 additions & 19 deletions examples/AccountManagement/LinkManagerToClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@
use Google\Ads\GoogleAds\Examples\Utils\ArgumentNames;
use Google\Ads\GoogleAds\Examples\Utils\ArgumentParser;
use Google\Ads\GoogleAds\Lib\OAuth2TokenBuilder;
use Google\Ads\GoogleAds\Lib\V17\GoogleAdsClient;
use Google\Ads\GoogleAds\Lib\V17\GoogleAdsClientBuilder;
use Google\Ads\GoogleAds\Lib\V17\GoogleAdsException;
use Google\Ads\GoogleAds\Lib\V20\GoogleAdsClient;
use Google\Ads\GoogleAds\Lib\V20\GoogleAdsClientBuilder;
use Google\Ads\GoogleAds\Lib\V20\GoogleAdsException;
use Google\Ads\GoogleAds\Util\FieldMasks;
use Google\Ads\GoogleAds\Util\V17\ResourceNames;
use Google\Ads\GoogleAds\V17\Enums\ManagerLinkStatusEnum\ManagerLinkStatus;
use Google\Ads\GoogleAds\V17\Errors\GoogleAdsError;
use Google\Ads\GoogleAds\V17\Resources\CustomerClientLink;
use Google\Ads\GoogleAds\V17\Resources\CustomerManagerLink;
use Google\Ads\GoogleAds\V17\Services\CustomerClientLinkOperation;
use Google\Ads\GoogleAds\V17\Services\CustomerManagerLinkOperation;
use Google\Ads\GoogleAds\V17\Services\MutateCustomerClientLinkRequest;
use Google\Ads\GoogleAds\V17\Services\MutateCustomerManagerLinkRequest;
use Google\Ads\GoogleAds\V17\Services\SearchGoogleAdsRequest;
use Google\Ads\GoogleAds\Util\V20\ResourceNames;
use Google\Ads\GoogleAds\V20\Enums\ManagerLinkStatusEnum\ManagerLinkStatus;
use Google\Ads\GoogleAds\V20\Errors\GoogleAdsError;
use Google\Ads\GoogleAds\V20\Resources\CustomerClientLink;
use Google\Ads\GoogleAds\V20\Resources\CustomerManagerLink;
use Google\Ads\GoogleAds\V20\Services\CustomerClientLinkOperation;
use Google\Ads\GoogleAds\V20\Services\CustomerManagerLinkOperation;
use Google\Ads\GoogleAds\V20\Services\MutateCustomerClientLinkRequest;
use Google\Ads\GoogleAds\V20\Services\MutateCustomerManagerLinkRequest;
use Google\Ads\GoogleAds\V20\Services\SearchGoogleAdsRequest;
use Google\ApiCore\ApiException;

/**
Expand Down Expand Up @@ -288,12 +288,6 @@ private static function createGoogleAdsClient(int $loginCustomerId)
->withOAuth2Credential($oAuth2Credential)
// Overrides the login customer ID with the given one.
->withLoginCustomerId($loginCustomerId)
// We set this value to true to show how to use GAPIC v2 source code. You can remove the
// below line if you wish to use the old-style source code. Note that in that case, you
// probably need to modify some parts of the code below to make it work.
// For more information, see
// https://developers.devsite.corp.google.com/google-ads/api/docs/client-libs/php/gapic.
->usingGapicV2Source(true)
->build();
}
}
Expand Down
Loading
Loading