Skip to content

Commit

Permalink
Merge pull request #489 from googleads/release-v13.0-678c748e6a9e9c76…
Browse files Browse the repository at this point in the history
…34ad

Changes for release v15.0.
  • Loading branch information
Raibaz authored Feb 23, 2023
2 parents e35e100 + 19bf838 commit 9daecba
Show file tree
Hide file tree
Showing 1,447 changed files with 723,323 additions and 1,657 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
15.0.0
======
- Added support for version v13.0 of the Google Ads API.
- Removed support for v10 of the Google Ads API.
- Fixed some code examples.
- Updated AddCustomerMatchUserList to clarify UserIdentifier usage.

14.2.0
======
- Update the dependencies on Google.Ads.GoogleAds.Core and Google.Ads.Gax
Expand Down
6 changes: 3 additions & 3 deletions Google.Ads.GoogleAds.Core/src/Lib/GoogleAdsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ public GoogleAdsClient(GoogleAdsConfig config) : base(config) { }
/// <para>Gets an instance of the specified service. Use this method with a predefined
/// list of templates available for each supported version. E.g.</para>
/// <para>
/// // Gets an instance of V12.GoogleAdsServiceClient<br/>
/// GoogleAdsServiceClient googleAdsService = client.GetService(Services.V12.GoogleAdsService);
/// // Gets an instance of V13.GoogleAdsServiceClient<br/>
/// GoogleAdsServiceClient googleAdsService = client.GetService(Services.V13.GoogleAdsService);
/// </para>
/// </summary>
/// <param name="serviceTemplate"><para>The template that corresponds to the service to
/// be created. Predefined service templates are available for each supported version, as
/// a nested class within the <code>Services</code> class.</para>
/// <para>E.g. <code>Services.V12</code> class contains predefined templates for v12 of
/// <para>E.g. <code>Services.V13</code> class contains predefined templates for v13 of
/// the Google Ads API.</para>
/// </param>
/// <returns>A service instance.</returns>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
using Google.Ads.Gax.Examples;
using Google.Ads.Gax.Util;
using Google.Ads.GoogleAds.Lib;
using Google.Ads.GoogleAds.V12.Errors;
using Google.Ads.GoogleAds.V12.Resources;
using Google.Ads.GoogleAds.V12.Services;
using Google.Ads.GoogleAds.V13.Errors;
using Google.Ads.GoogleAds.V13.Resources;
using Google.Ads.GoogleAds.V13.Services;
using System;
using System.Collections.Generic;
using static Google.Ads.GoogleAds.V12.Enums.MerchantCenterLinkStatusEnum.Types;
using static Google.Ads.GoogleAds.V13.Enums.MerchantCenterLinkStatusEnum.Types;

namespace Google.Ads.GoogleAds.Examples.V12
namespace Google.Ads.GoogleAds.Examples.V13
{
/// <summary>
/// This code example demonstrates how to approve a Merchant Center link request.
Expand Down Expand Up @@ -94,7 +94,7 @@ public void Run(GoogleAdsClient client, long customerId, long merchantCenterAcco
{
// Get the MerchantCenterLink.
MerchantCenterLinkServiceClient merchantCenterLinkService = client.GetService(
Services.V12.MerchantCenterLinkService);
Services.V13.MerchantCenterLinkService);

try
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
using CommandLine;
using Google.Ads.Gax.Examples;
using Google.Ads.GoogleAds.Lib;
using Google.Ads.GoogleAds.V12.Errors;
using Google.Ads.GoogleAds.V12.Resources;
using Google.Ads.GoogleAds.V12.Services;
using Google.Ads.GoogleAds.V13.Errors;
using Google.Ads.GoogleAds.V13.Resources;
using Google.Ads.GoogleAds.V13.Services;
using System;
using System.Collections.Generic;

namespace Google.Ads.GoogleAds.Examples.V12
namespace Google.Ads.GoogleAds.Examples.V13
{
/// <summary>
/// This code example illustrates how to create a new customer under a given manager account.
Expand Down Expand Up @@ -76,7 +76,7 @@ public static void Main(string[] args)
public void Run(GoogleAdsClient client, long managerCustomerId)
{
// Get the CustomerService.
CustomerServiceClient customerService = client.GetService(Services.V12.CustomerService);
CustomerServiceClient customerService = client.GetService(Services.V13.CustomerService);

Customer customer = new Customer()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
using CommandLine;
using Google.Ads.Gax.Examples;
using Google.Ads.GoogleAds.Lib;
using Google.Ads.GoogleAds.V12.Resources;
using Google.Ads.GoogleAds.V12.Services;
using Google.Ads.GoogleAds.V13.Resources;
using Google.Ads.GoogleAds.V13.Services;
using Google.Api.Gax;
using System;
using System.Collections.Generic;

namespace Google.Ads.GoogleAds.Examples.V12
namespace Google.Ads.GoogleAds.Examples.V13
{
/// <summary>
/// This example gets the account hierarchy of the specified manager account. If you don't
Expand Down Expand Up @@ -99,10 +99,10 @@ public void Run(GoogleAdsClient googleAdsClient, long? managerCustomerId = null,
}

GoogleAdsServiceClient googleAdsServiceClient =
googleAdsClient.GetService(Services.V12.GoogleAdsService);
googleAdsClient.GetService(Services.V13.GoogleAdsService);

CustomerServiceClient customerServiceClient =
googleAdsClient.GetService(Services.V12.CustomerService);
googleAdsClient.GetService(Services.V13.CustomerService);

// List of Customer IDs to handle.
List<long> seedCustomerIds = new List<long>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
using CommandLine;
using Google.Ads.Gax.Examples;
using Google.Ads.GoogleAds.Lib;
using Google.Ads.GoogleAds.V12.Errors;
using Google.Ads.GoogleAds.V12.Resources;
using Google.Ads.GoogleAds.V12.Services;
using Google.Ads.GoogleAds.V13.Errors;
using Google.Ads.GoogleAds.V13.Resources;
using Google.Ads.GoogleAds.V13.Services;
using System;
using System.Collections.Generic;
using System.Linq;

namespace Google.Ads.GoogleAds.Examples.V12
namespace Google.Ads.GoogleAds.Examples.V13
{
/// <summary>
/// This code example lists basic information about an advertising account, like the name,
Expand Down Expand Up @@ -73,7 +73,7 @@ public void Run(GoogleAdsClient client, long customerId)
{
// Get the GoogleAdsService.
GoogleAdsServiceClient googleAdsService = client.GetService(
Services.V12.GoogleAdsService);
Services.V13.GoogleAdsService);

// Construct a query to retrieve the customer.
// Add a limit of 1 row to clarify that selecting from the customer resource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@
using Google.Ads.Gax.Examples;
using Google.Ads.Gax.Util;
using Google.Ads.GoogleAds.Lib;
using Google.Ads.GoogleAds.V12.Errors;
using Google.Ads.GoogleAds.V12.Resources;
using Google.Ads.GoogleAds.V12.Services;
using Google.Ads.GoogleAds.V13.Errors;
using Google.Ads.GoogleAds.V13.Resources;
using Google.Ads.GoogleAds.V13.Services;
using Google.Protobuf;
using System;
using System.Collections.Generic;
using static Google.Ads.GoogleAds.V12.Enums.ChangeEventResourceTypeEnum.Types;
using static Google.Ads.GoogleAds.V12.Enums.ResourceChangeOperationEnum.Types;
using static Google.Ads.GoogleAds.V12.Resources.ChangeEvent.Types;
using static Google.Ads.GoogleAds.V13.Enums.ChangeEventResourceTypeEnum.Types;
using static Google.Ads.GoogleAds.V13.Enums.ResourceChangeOperationEnum.Types;
using static Google.Ads.GoogleAds.V13.Resources.ChangeEvent.Types;

namespace Google.Ads.GoogleAds.Examples.V12
namespace Google.Ads.GoogleAds.Examples.V13
{
/// <summary>
/// This code example gets the changes in an account during the last 25 days.
Expand Down Expand Up @@ -76,7 +76,7 @@ public void Run(GoogleAdsClient client, long customerId)
{
// Get the GoogleAdsService.
GoogleAdsServiceClient googleAdsService = client.GetService(
Services.V12.GoogleAdsService);
Services.V13.GoogleAdsService);

// Construct a query to find details for recent changes in your account.
// The LIMIT clause is required for the change_event resource.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
using CommandLine;
using Google.Ads.Gax.Examples;
using Google.Ads.GoogleAds.Lib;
using Google.Ads.GoogleAds.V12.Errors;
using Google.Ads.GoogleAds.V12.Services;
using Google.Ads.GoogleAds.V13.Errors;
using Google.Ads.GoogleAds.V13.Services;
using Google.Api.Gax;
using System;
using System.Collections.Generic;
using static Google.Ads.GoogleAds.V12.Enums.ChangeStatusResourceTypeEnum.Types;
using static Google.Ads.GoogleAds.V13.Enums.ChangeStatusResourceTypeEnum.Types;

namespace Google.Ads.GoogleAds.Examples.V12
namespace Google.Ads.GoogleAds.Examples.V13
{
/// <summary>
/// This code example gets a list of which resources have been changed in your account
Expand Down Expand Up @@ -78,7 +78,7 @@ public void Run(GoogleAdsClient client, long customerId)
{
// Get the GoogleAdsService.
GoogleAdsServiceClient googleAdsService = client.GetService(
Services.V12.GoogleAdsService);
Services.V13.GoogleAdsService);

string searchQuery = @"
SELECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
using CommandLine;
using Google.Ads.Gax.Examples;
using Google.Ads.GoogleAds.Lib;
using Google.Ads.GoogleAds.V12.Errors;
using Google.Ads.GoogleAds.V12.Services;
using Google.Ads.GoogleAds.V13.Errors;
using Google.Ads.GoogleAds.V13.Services;
using System;
using System.Collections.Generic;

namespace Google.Ads.GoogleAds.Examples.V12
namespace Google.Ads.GoogleAds.Examples.V13
{
/// <summary>
/// This code example retrieves pending invitations for a customer account. To create a pending
Expand Down Expand Up @@ -71,7 +71,7 @@ public void Run(GoogleAdsClient client, long customerId)
{
// Get the AdGroupService.
GoogleAdsServiceClient googleAdsService = client.GetService(
Services.V12.GoogleAdsService);
Services.V13.GoogleAdsService);

// [START get_pending_invitations]
// Create the search query.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
using CommandLine;
using Google.Ads.Gax.Examples;
using Google.Ads.GoogleAds.Lib;
using Google.Ads.GoogleAds.V12.Errors;
using Google.Ads.GoogleAds.V12.Resources;
using Google.Ads.GoogleAds.V12.Services;
using Google.Ads.GoogleAds.V13.Errors;
using Google.Ads.GoogleAds.V13.Resources;
using Google.Ads.GoogleAds.V13.Services;
using System;
using System.Collections.Generic;
using static Google.Ads.GoogleAds.V12.Enums.AccessRoleEnum.Types;
using static Google.Ads.GoogleAds.V13.Enums.AccessRoleEnum.Types;

namespace Google.Ads.GoogleAds.Examples.V12
namespace Google.Ads.GoogleAds.Examples.V13
{
/// <summary>
/// This code example sends an invitation email to a user to manage a customer
Expand Down Expand Up @@ -92,7 +92,7 @@ public void Run(GoogleAdsClient client, long customerId, string emailAddress,
{
// Get the CustomerUserAccessInvitationService.
CustomerUserAccessInvitationServiceClient service = client.GetService(
Services.V12.CustomerUserAccessInvitationService);
Services.V13.CustomerUserAccessInvitationService);

// [START invite_user_with_access_role]
MutateCustomerUserAccessInvitationRequest invitationRequest =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
using Google.Ads.Gax.Examples;
using Google.Ads.Gax.Util;
using Google.Ads.GoogleAds.Lib;
using Google.Ads.GoogleAds.V12.Errors;
using Google.Ads.GoogleAds.V12.Resources;
using Google.Ads.GoogleAds.V12.Services;
using Google.Ads.GoogleAds.V13.Errors;
using Google.Ads.GoogleAds.V13.Resources;
using Google.Ads.GoogleAds.V13.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using static Google.Ads.GoogleAds.V12.Enums.ManagerLinkStatusEnum.Types;
using static Google.Ads.GoogleAds.V13.Enums.ManagerLinkStatusEnum.Types;

namespace Google.Ads.GoogleAds.Examples.V12
namespace Google.Ads.GoogleAds.Examples.V13
{
/// <summary>
/// This code example demonstrates how to link an existing Google Ads manager customer
Expand Down Expand Up @@ -124,7 +124,7 @@ private string CreateInvitation(GoogleAdsClient client, long managerCustomerId,
{
// Get the CustomerClientLinkService.
CustomerClientLinkServiceClient customerClientLinkService =
client.GetService(Services.V12.CustomerClientLinkService);
client.GetService(Services.V13.CustomerClientLinkService);

// Create a client with the manager customer ID as login customer ID.
client.Config.LoginCustomerId = managerCustomerId.ToString();
Expand Down Expand Up @@ -175,7 +175,7 @@ private string GetManagerLinkResourceName(GoogleAdsClient client, long managerCu
{
// Get the GoogleAdsService.
GoogleAdsServiceClient googleAdsService =
client.GetService(Services.V12.GoogleAdsService);
client.GetService(Services.V13.GoogleAdsService);

// Create a client with the manager customer ID as login customer ID.
client.Config.LoginCustomerId = managerCustomerId.ToString();
Expand Down Expand Up @@ -211,7 +211,7 @@ private void AcceptInvitation(GoogleAdsClient client, long clientCustomerId,
{
// Get the CustomerManagerLinkService.
CustomerManagerLinkServiceClient customerManagerLinkService =
client.GetService(Services.V12.CustomerManagerLinkService);
client.GetService(Services.V13.CustomerManagerLinkService);

// Create a client with the client customer ID as login customer ID.
client.Config.LoginCustomerId = clientCustomerId.ToString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
using CommandLine;
using Google.Ads.Gax.Examples;
using Google.Ads.GoogleAds.Lib;
using Google.Ads.GoogleAds.V12.Errors;
using Google.Ads.GoogleAds.V12.Services;
using Google.Ads.GoogleAds.V13.Errors;
using Google.Ads.GoogleAds.V13.Services;
using System;
using System.Collections.Generic;

namespace Google.Ads.GoogleAds.Examples.V12
namespace Google.Ads.GoogleAds.Examples.V13
{
/// <summary>
/// This code example lists the resource names for the customers that the authenticating user
Expand Down Expand Up @@ -70,7 +70,7 @@ public static void Main(string[] args)
public void Run(GoogleAdsClient client)
{
// Get the CustomerService.
CustomerServiceClient customerService = client.GetService(Services.V12.CustomerService);
CustomerServiceClient customerService = client.GetService(Services.V13.CustomerService);

try
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
using CommandLine;
using Google.Ads.Gax.Examples;
using Google.Ads.GoogleAds.Lib;
using Google.Ads.GoogleAds.V12.Errors;
using Google.Ads.GoogleAds.V12.Resources;
using Google.Ads.GoogleAds.V12.Services;
using Google.Ads.GoogleAds.V13.Errors;
using Google.Ads.GoogleAds.V13.Resources;
using Google.Ads.GoogleAds.V13.Services;
using System;
using System.Collections.Generic;

namespace Google.Ads.GoogleAds.Examples.V12
namespace Google.Ads.GoogleAds.Examples.V13
{
/// <summary>
/// This code example demonstrates how to reject a Merchant Center link request.
Expand Down Expand Up @@ -90,7 +90,7 @@ public void Run(GoogleAdsClient client, long customerId, long merchantCenterAcco
{
// Get the MerchantCenterLinkService.
MerchantCenterLinkServiceClient merchantCenterLinkServiceClient =
client.GetService(Services.V12.MerchantCenterLinkService);
client.GetService(Services.V13.MerchantCenterLinkService);

try
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
using Google.Ads.Gax.Examples;
using Google.Ads.Gax.Util;
using Google.Ads.GoogleAds.Lib;
using Google.Ads.GoogleAds.V12.Errors;
using Google.Ads.GoogleAds.V12.Resources;
using Google.Ads.GoogleAds.V12.Services;
using Google.Ads.GoogleAds.V13.Errors;
using Google.Ads.GoogleAds.V13.Resources;
using Google.Ads.GoogleAds.V13.Services;
using Google.Api.Gax;
using System;
using System.Collections.Generic;
using System.Linq;
using static Google.Ads.GoogleAds.V12.Enums.AccessRoleEnum.Types;
using static Google.Ads.GoogleAds.V13.Enums.AccessRoleEnum.Types;

namespace Google.Ads.GoogleAds.Examples.V12
namespace Google.Ads.GoogleAds.Examples.V13
{
/// <summary>
/// This code example updates the access role of a user, given the email address.
Expand Down Expand Up @@ -131,7 +131,7 @@ public void Run(GoogleAdsClient client, long customerId, string emailAddress,
{
// Get the GoogleAdsService.
GoogleAdsServiceClient googleAdsService = client.GetService(
Services.V12.GoogleAdsService);
Services.V13.GoogleAdsService);

// Create the search query. Use the LIKE query for filtering to ignore the text case
// for email address when searching for a match.
Expand Down Expand Up @@ -175,7 +175,7 @@ private void ModifyUserAccess(GoogleAdsClient client, long customerId, long user
{
// Get the CustomerUserAccessService.
CustomerUserAccessServiceClient userAccessService = client.GetService(
Services.V12.CustomerUserAccessService);
Services.V13.CustomerUserAccessService);

// Creates the modified user access.
CustomerUserAccess userAccess = new CustomerUserAccess()
Expand Down
Loading

0 comments on commit 9daecba

Please sign in to comment.