Skip to content

Commit 7a7553c

Browse files
authored
Merge pull request #578 from googleads/release-V21.1.0-8844fc83b51dcf2ab468
Changes for release V21.1.0.
2 parents f6c97c6 + 6cdc033 commit 7a7553c

File tree

1,553 files changed

+842979
-921
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,553 files changed

+842979
-921
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
21.1.0
22
======
3+
- Added support for version 18.0 of the Google Ads API.
4+
- Updated the `GetAllDisapprovedAds` example to use the `SearchSettings` object.
5+
- Added support for adding a `GoogleAdsClient` to a DI container, see [#573](https://github.com/googleads/google-ads-dotnet/pull/573)
6+
7+
21.0.0
8+
======
39
- Added support for version 17.1 of the Google Ads API.
410
- Removed support for version 15 of the Google Ads API.
511

Google.Ads.GoogleAds.Core/src/Google.Ads.GoogleAds.Core.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<Title>Google Ads API Core Dotnet Client Library</Title>
55
<PackageId>Google.Ads.GoogleAds.Core</PackageId>
6-
<Version>4.0.1</Version>
6+
<Version>4.0.2</Version>
77
<Description>This library provides you with functionality to access the Google Ads API. The Google Ads API is the modern programmatic interface to Google Ads and the next generation of the AdWords API. See https://developers.google.com/google-ads/api to learn more about Google Ads API.</Description>
88
<PackageReleaseNotes>https://github.com/googleads/google-ads-dotnet/blob/master/ChangeLog</PackageReleaseNotes>
99
<PackageTags>GoogleAds Google</PackageTags>
@@ -30,8 +30,8 @@
3030
<IncludeSource>true</IncludeSource>
3131
<GenerateDocumentationFile>true</GenerateDocumentationFile>
3232
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
33-
<AssemblyVersion>4.0.1</AssemblyVersion>
34-
<FileVersion>4.0.1</FileVersion>
33+
<AssemblyVersion>4.0.2</AssemblyVersion>
34+
<FileVersion>4.0.2</FileVersion>
3535
<LangVersion>latest</LangVersion>
3636
</PropertyGroup>
3737
<ItemGroup>

Google.Ads.GoogleAds.Extensions/src/Google.Ads.GoogleAds.Extensions.csproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<Title>Google Ads API Dotnet Client Library Extensions</Title>
55
<PackageId>Google.Ads.GoogleAds.Extensions</PackageId>
6-
<Version>2.0.0</Version>
6+
<Version>2.0.1</Version>
77
<Description>This library provides you with extensions for the Google Ads API client library. The Google Ads API is the modern programmatic interface to Google Ads. See https://developers.google.com/google-ads/api to learn more about Google Ads API.</Description>
88
<PackageReleaseNotes>https://github.com/googleads/google-ads-dotnet/blob/master/ChangeLog</PackageReleaseNotes>
99
<PackageTags>GoogleAds Google</PackageTags>
@@ -31,8 +31,8 @@
3131
<IncludeSource>true</IncludeSource>
3232
<GenerateDocumentationFile>true</GenerateDocumentationFile>
3333
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
34-
<AssemblyVersion>2.0.0</AssemblyVersion>
35-
<FileVersion>2.0.0</FileVersion>
34+
<AssemblyVersion>2.0.1</AssemblyVersion>
35+
<FileVersion>2.0.1</FileVersion>
3636
<LangVersion>latest</LangVersion>
3737
</PropertyGroup>
3838
<ItemGroup>
@@ -45,7 +45,7 @@
4545
<None Include="..\..\logo.png" Pack="true" PackagePath="" />
4646
</ItemGroup>
4747
<ItemGroup>
48-
<PackageReference Condition="!Exists('..\..\Google.Ads.GoogleAds.Core\src\Google.Ads.GoogleAds.Core.csproj')" Include="Google.Ads.GoogleAds.Core" Version="4.0.0" />
48+
<PackageReference Condition="!Exists('..\..\Google.Ads.GoogleAds.Core\src\Google.Ads.GoogleAds.Core.csproj')" Include="Google.Ads.GoogleAds.Core" Version="4.0.2" />
4949
<ProjectReference Condition="Exists('..\..\Google.Ads.GoogleAds.Core\src\Google.Ads.GoogleAds.Core.csproj')" Include="..\..\Google.Ads.GoogleAds.Core\src\Google.Ads.GoogleAds.Core.csproj" />
5050
<PackageReference Condition="!Exists('..\..\Google.Ads.Gax\src\Google.Ads.Gax.csproj')" Include="Google.Ads.Gax" Version="4.0.0" />
5151
<ProjectReference Condition="Exists('..\..\Google.Ads.Gax\src\Google.Ads.Gax.csproj')" Include="..\..\Google.Ads.Gax\src\Google.Ads.Gax.csproj" />

Google.Ads.GoogleAds/examples/AccountManagement/CreateCustomer.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
using CommandLine;
1616
using Google.Ads.Gax.Examples;
1717
using Google.Ads.GoogleAds.Lib;
18-
using Google.Ads.GoogleAds.V17.Errors;
19-
using Google.Ads.GoogleAds.V17.Resources;
20-
using Google.Ads.GoogleAds.V17.Services;
18+
using Google.Ads.GoogleAds.V18.Errors;
19+
using Google.Ads.GoogleAds.V18.Resources;
20+
using Google.Ads.GoogleAds.V18.Services;
2121
using System;
2222
using System.Collections.Generic;
2323

24-
namespace Google.Ads.GoogleAds.Examples.V17
24+
namespace Google.Ads.GoogleAds.Examples.V18
2525
{
2626
/// <summary>
2727
/// This code example illustrates how to create a new customer under a given manager account.
@@ -76,7 +76,7 @@ public static void Main(string[] args)
7676
public void Run(GoogleAdsClient client, long managerCustomerId)
7777
{
7878
// Get the CustomerService.
79-
CustomerServiceClient customerService = client.GetService(Services.V17.CustomerService);
79+
CustomerServiceClient customerService = client.GetService(Services.V18.CustomerService);
8080

8181
Customer customer = new Customer()
8282
{

Google.Ads.GoogleAds/examples/AccountManagement/GetAccountHierarchy.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
using CommandLine;
1616
using Google.Ads.Gax.Examples;
1717
using Google.Ads.GoogleAds.Lib;
18-
using Google.Ads.GoogleAds.V17.Resources;
19-
using Google.Ads.GoogleAds.V17.Services;
18+
using Google.Ads.GoogleAds.V18.Resources;
19+
using Google.Ads.GoogleAds.V18.Services;
2020
using Google.Api.Gax;
2121
using System;
2222
using System.Collections.Generic;
2323

24-
namespace Google.Ads.GoogleAds.Examples.V17
24+
namespace Google.Ads.GoogleAds.Examples.V18
2525
{
2626
/// <summary>
2727
/// This example gets the account hierarchy of the specified manager account. If you don't
@@ -97,10 +97,10 @@ public void Run(GoogleAdsClient googleAdsClient, long? managerCustomerId = null,
9797
}
9898

9999
GoogleAdsServiceClient googleAdsServiceClient =
100-
googleAdsClient.GetService(Services.V17.GoogleAdsService);
100+
googleAdsClient.GetService(Services.V18.GoogleAdsService);
101101

102102
CustomerServiceClient customerServiceClient =
103-
googleAdsClient.GetService(Services.V17.CustomerService);
103+
googleAdsClient.GetService(Services.V18.CustomerService);
104104

105105
// List of Customer IDs to handle.
106106
List<long> seedCustomerIds = new List<long>();

Google.Ads.GoogleAds/examples/AccountManagement/GetChangeDetails.cs

+8-8
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@
1616
using Google.Ads.Gax.Examples;
1717
using Google.Ads.Gax.Util;
1818
using Google.Ads.GoogleAds.Lib;
19-
using Google.Ads.GoogleAds.V17.Errors;
20-
using Google.Ads.GoogleAds.V17.Resources;
21-
using Google.Ads.GoogleAds.V17.Services;
19+
using Google.Ads.GoogleAds.V18.Errors;
20+
using Google.Ads.GoogleAds.V18.Resources;
21+
using Google.Ads.GoogleAds.V18.Services;
2222
using Google.Protobuf;
2323
using System;
2424
using System.Collections.Generic;
25-
using static Google.Ads.GoogleAds.V17.Enums.ChangeEventResourceTypeEnum.Types;
26-
using static Google.Ads.GoogleAds.V17.Enums.ResourceChangeOperationEnum.Types;
27-
using static Google.Ads.GoogleAds.V17.Resources.ChangeEvent.Types;
25+
using static Google.Ads.GoogleAds.V18.Enums.ChangeEventResourceTypeEnum.Types;
26+
using static Google.Ads.GoogleAds.V18.Enums.ResourceChangeOperationEnum.Types;
27+
using static Google.Ads.GoogleAds.V18.Resources.ChangeEvent.Types;
2828

29-
namespace Google.Ads.GoogleAds.Examples.V17
29+
namespace Google.Ads.GoogleAds.Examples.V18
3030
{
3131
/// <summary>
3232
/// This code example gets the changes in an account during the last 25 days.
@@ -76,7 +76,7 @@ public void Run(GoogleAdsClient client, long customerId)
7676
{
7777
// Get the GoogleAdsService.
7878
GoogleAdsServiceClient googleAdsService = client.GetService(
79-
Services.V17.GoogleAdsService);
79+
Services.V18.GoogleAdsService);
8080

8181
// Construct a query to find details for recent changes in your account.
8282
// The LIMIT clause is required for the change_event resource.

Google.Ads.GoogleAds/examples/AccountManagement/GetChangeSummary.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
using CommandLine;
1616
using Google.Ads.Gax.Examples;
1717
using Google.Ads.GoogleAds.Lib;
18-
using Google.Ads.GoogleAds.V17.Errors;
19-
using Google.Ads.GoogleAds.V17.Services;
18+
using Google.Ads.GoogleAds.V18.Errors;
19+
using Google.Ads.GoogleAds.V18.Services;
2020
using Google.Api.Gax;
2121
using System;
2222
using System.Collections.Generic;
23-
using static Google.Ads.GoogleAds.V17.Enums.ChangeStatusResourceTypeEnum.Types;
23+
using static Google.Ads.GoogleAds.V18.Enums.ChangeStatusResourceTypeEnum.Types;
2424

25-
namespace Google.Ads.GoogleAds.Examples.V17
25+
namespace Google.Ads.GoogleAds.Examples.V18
2626
{
2727
/// <summary>
2828
/// This code example gets a list of which resources have been changed in your account
@@ -73,7 +73,7 @@ public void Run(GoogleAdsClient client, long customerId)
7373
{
7474
// Get the GoogleAdsService.
7575
GoogleAdsServiceClient googleAdsService = client.GetService(
76-
Services.V17.GoogleAdsService);
76+
Services.V18.GoogleAdsService);
7777

7878
string searchQuery = @"
7979
SELECT

Google.Ads.GoogleAds/examples/AccountManagement/InviteUserWithAccessRole.cs

+6-6
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
using CommandLine;
1616
using Google.Ads.Gax.Examples;
1717
using Google.Ads.GoogleAds.Lib;
18-
using Google.Ads.GoogleAds.V17.Errors;
19-
using Google.Ads.GoogleAds.V17.Resources;
20-
using Google.Ads.GoogleAds.V17.Services;
18+
using Google.Ads.GoogleAds.V18.Errors;
19+
using Google.Ads.GoogleAds.V18.Resources;
20+
using Google.Ads.GoogleAds.V18.Services;
2121
using System;
2222
using System.Collections.Generic;
23-
using static Google.Ads.GoogleAds.V17.Enums.AccessRoleEnum.Types;
23+
using static Google.Ads.GoogleAds.V18.Enums.AccessRoleEnum.Types;
2424

25-
namespace Google.Ads.GoogleAds.Examples.V17
25+
namespace Google.Ads.GoogleAds.Examples.V18
2626
{
2727
/// <summary>
2828
/// This code example sends an invitation email to a user to manage a customer
@@ -92,7 +92,7 @@ public void Run(GoogleAdsClient client, long customerId, string emailAddress,
9292
{
9393
// Get the CustomerUserAccessInvitationService.
9494
CustomerUserAccessInvitationServiceClient service = client.GetService(
95-
Services.V17.CustomerUserAccessInvitationService);
95+
Services.V18.CustomerUserAccessInvitationService);
9696

9797
// [START invite_user_with_access_role]
9898
MutateCustomerUserAccessInvitationRequest invitationRequest =

Google.Ads.GoogleAds/examples/AccountManagement/LinkManagerToClient.cs

+8-8
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
using Google.Ads.Gax.Examples;
1717
using Google.Ads.Gax.Util;
1818
using Google.Ads.GoogleAds.Lib;
19-
using Google.Ads.GoogleAds.V17.Errors;
20-
using Google.Ads.GoogleAds.V17.Resources;
21-
using Google.Ads.GoogleAds.V17.Services;
19+
using Google.Ads.GoogleAds.V18.Errors;
20+
using Google.Ads.GoogleAds.V18.Resources;
21+
using Google.Ads.GoogleAds.V18.Services;
2222
using System;
2323
using System.Collections.Generic;
2424
using System.Linq;
25-
using static Google.Ads.GoogleAds.V17.Enums.ManagerLinkStatusEnum.Types;
25+
using static Google.Ads.GoogleAds.V18.Enums.ManagerLinkStatusEnum.Types;
2626

27-
namespace Google.Ads.GoogleAds.Examples.V17
27+
namespace Google.Ads.GoogleAds.Examples.V18
2828
{
2929
/// <summary>
3030
/// This code example demonstrates how to link an existing Google Ads manager customer
@@ -124,7 +124,7 @@ private string CreateInvitation(GoogleAdsClient client, long managerCustomerId,
124124
{
125125
// Get the CustomerClientLinkService.
126126
CustomerClientLinkServiceClient customerClientLinkService =
127-
client.GetService(Services.V17.CustomerClientLinkService);
127+
client.GetService(Services.V18.CustomerClientLinkService);
128128

129129
// Create a client with the manager customer ID as login customer ID.
130130
client.Config.LoginCustomerId = managerCustomerId.ToString();
@@ -175,7 +175,7 @@ private string GetManagerLinkResourceName(GoogleAdsClient client, long managerCu
175175
{
176176
// Get the GoogleAdsService.
177177
GoogleAdsServiceClient googleAdsService =
178-
client.GetService(Services.V17.GoogleAdsService);
178+
client.GetService(Services.V18.GoogleAdsService);
179179

180180
// Create a client with the manager customer ID as login customer ID.
181181
client.Config.LoginCustomerId = managerCustomerId.ToString();
@@ -211,7 +211,7 @@ private void AcceptInvitation(GoogleAdsClient client, long clientCustomerId,
211211
{
212212
// Get the CustomerManagerLinkService.
213213
CustomerManagerLinkServiceClient customerManagerLinkService =
214-
client.GetService(Services.V17.CustomerManagerLinkService);
214+
client.GetService(Services.V18.CustomerManagerLinkService);
215215

216216
// Create a client with the client customer ID as login customer ID.
217217
client.Config.LoginCustomerId = clientCustomerId.ToString();

Google.Ads.GoogleAds/examples/AccountManagement/ListAccessibleCustomers.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
using CommandLine;
1616
using Google.Ads.Gax.Examples;
1717
using Google.Ads.GoogleAds.Lib;
18-
using Google.Ads.GoogleAds.V17.Errors;
19-
using Google.Ads.GoogleAds.V17.Services;
18+
using Google.Ads.GoogleAds.V18.Errors;
19+
using Google.Ads.GoogleAds.V18.Services;
2020
using System;
2121
using System.Collections.Generic;
2222

23-
namespace Google.Ads.GoogleAds.Examples.V17
23+
namespace Google.Ads.GoogleAds.Examples.V18
2424
{
2525
/// <summary>
2626
/// This code example lists the resource names for the customers that the authenticating user
@@ -70,7 +70,7 @@ public static void Main(string[] args)
7070
public void Run(GoogleAdsClient client)
7171
{
7272
// Get the CustomerService.
73-
CustomerServiceClient customerService = client.GetService(Services.V17.CustomerService);
73+
CustomerServiceClient customerService = client.GetService(Services.V18.CustomerService);
7474

7575
try
7676
{

Google.Ads.GoogleAds/examples/AccountManagement/UpdateUserAccess.cs

+7-7
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@
1616
using Google.Ads.Gax.Examples;
1717
using Google.Ads.Gax.Util;
1818
using Google.Ads.GoogleAds.Lib;
19-
using Google.Ads.GoogleAds.V17.Errors;
20-
using Google.Ads.GoogleAds.V17.Resources;
21-
using Google.Ads.GoogleAds.V17.Services;
19+
using Google.Ads.GoogleAds.V18.Errors;
20+
using Google.Ads.GoogleAds.V18.Resources;
21+
using Google.Ads.GoogleAds.V18.Services;
2222
using Google.Api.Gax;
2323
using System;
2424
using System.Collections.Generic;
2525
using System.Linq;
26-
using static Google.Ads.GoogleAds.V17.Enums.AccessRoleEnum.Types;
26+
using static Google.Ads.GoogleAds.V18.Enums.AccessRoleEnum.Types;
2727

28-
namespace Google.Ads.GoogleAds.Examples.V17
28+
namespace Google.Ads.GoogleAds.Examples.V18
2929
{
3030
/// <summary>
3131
/// This code example updates the access role of a user, given the email address.
@@ -131,7 +131,7 @@ public void Run(GoogleAdsClient client, long customerId, string emailAddress,
131131
{
132132
// Get the GoogleAdsService.
133133
GoogleAdsServiceClient googleAdsService = client.GetService(
134-
Services.V17.GoogleAdsService);
134+
Services.V18.GoogleAdsService);
135135

136136
// Create the search query. Use the LIKE query for filtering to ignore the text case
137137
// for email address when searching for a match.
@@ -175,7 +175,7 @@ private void ModifyUserAccess(GoogleAdsClient client, long customerId, long user
175175
{
176176
// Get the CustomerUserAccessService.
177177
CustomerUserAccessServiceClient userAccessService = client.GetService(
178-
Services.V17.CustomerUserAccessService);
178+
Services.V18.CustomerUserAccessService);
179179

180180
// Creates the modified user access.
181181
CustomerUserAccess userAccess = new CustomerUserAccess()

Google.Ads.GoogleAds/examples/AccountManagement/VerifyAdvertiserIdentity.cs

+7-7
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
using CommandLine;
1616
using Google.Ads.Gax.Examples;
1717
using Google.Ads.GoogleAds.Lib;
18-
using Google.Ads.GoogleAds.V17.Errors;
19-
using Google.Ads.GoogleAds.V17.Services;
20-
using static Google.Ads.GoogleAds.V17.Enums.IdentityVerificationProgramEnum.Types;
21-
using static Google.Ads.GoogleAds.V17.Enums.IdentityVerificationProgramStatusEnum.Types;
18+
using Google.Ads.GoogleAds.V18.Errors;
19+
using Google.Ads.GoogleAds.V18.Services;
20+
using static Google.Ads.GoogleAds.V18.Enums.IdentityVerificationProgramEnum.Types;
21+
using static Google.Ads.GoogleAds.V18.Enums.IdentityVerificationProgramStatusEnum.Types;
2222
using System;
2323
using Google.Ads.GoogleAds.Config;
2424
using Google.Ads.GoogleAds.Extensions.Config;
2525

26-
namespace Google.Ads.GoogleAds.Examples.V17
26+
namespace Google.Ads.GoogleAds.Examples.V18
2727
{
2828
/// <summary>
2929
/// This code example illustrates how to retrieve the status of the advertiser identity
@@ -130,7 +130,7 @@ private static IdentityVerification GetIdentityVerification(
130130
GoogleAdsClient client, long customerId)
131131
{
132132
IdentityVerificationServiceClient identityVerificationService =
133-
client.GetService(Services.V17.IdentityVerificationService);
133+
client.GetService(Services.V18.IdentityVerificationService);
134134

135135
try {
136136
GetIdentityVerificationResponse response =
@@ -179,7 +179,7 @@ private static IdentityVerification GetIdentityVerification(
179179
private static void StartIdentityVerification(GoogleAdsClient client, long customerId)
180180
{
181181
IdentityVerificationServiceClient identityVerificationService =
182-
client.GetService(Services.V17.IdentityVerificationService);
182+
client.GetService(Services.V18.IdentityVerificationService);
183183

184184
StartIdentityVerificationRequest request = new StartIdentityVerificationRequest()
185185
{

0 commit comments

Comments
 (0)