Skip to content

Commit

Permalink
Changes for release v17_0. (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurachevalier4 authored Jun 7, 2024
1 parent 233f41e commit 753da77
Show file tree
Hide file tree
Showing 1,905 changed files with 69,884 additions and 2,094 deletions.
6 changes: 5 additions & 1 deletion Build.PL
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 42,7 @@ $build_sc->new(
create_makefile_pl => "traditional",
dist_abstract => "Google Ads API Client Library for Perl",
dist_name => "Google-Ads-GoogleAds-Client",
dist_version => "22.0.0",
dist_version => "23.0.0",
no_index => {
namespace => [
"Google::Ads::GoogleAds::V15::Enums",
Expand All @@ -53,6 53,10 @@ $build_sc->new(
"Google::Ads::GoogleAds::V16::Common",
"Google::Ads::GoogleAds::V16::Resources",
"Google::Ads::GoogleAds::V16::Services",
"Google::Ads::GoogleAds::V17::Enums",
"Google::Ads::GoogleAds::V17::Common",
"Google::Ads::GoogleAds::V17::Resources",
"Google::Ads::GoogleAds::V17::Services",
],
},
requires => {
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 1,9 @@
23.0.0 - 2024-06-07
-------------------
- Added support for Google Ads API v17.
- Updated examples to remove usage of the page size parameter in Search
requests.

22.0.0 - 2024-04-24
-------------------
- Added support for Google Ads API v16.1.
Expand Down
4 changes: 2 additions & 2 deletions examples/account_management/create_customer.pl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 29,7 @@
use lib "$Bin/../../lib";
use Google::Ads::GoogleAds::Client;
use Google::Ads::GoogleAds::Utils::GoogleAdsHelper;
use Google::Ads::GoogleAds::V16::Resources::Customer;
use Google::Ads::GoogleAds::V17::Resources::Customer;

use Getopt::Long qw(:config auto_help);
use Pod::Usage;
Expand All @@ -51,7 51,7 @@ sub create_customer {
my ($api_client, $manager_customer_id) = @_;

# Initialize a customer to be created.
my $customer = Google::Ads::GoogleAds::V16::Resources::Customer->new({
my $customer = Google::Ads::GoogleAds::V17::Resources::Customer->new({
descriptiveName => "Account created with CustomerService on #" . uniqid(),

# For a list of valid currency codes and time zones, see this documentation:
Expand Down
4 changes: 2 additions & 2 deletions examples/account_management/get_account_hierarchy.pl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 32,7 @@
use Google::Ads::GoogleAds::Utils::GoogleAdsHelper;
use Google::Ads::GoogleAds::Utils::SearchStreamHandler;
use
Google::Ads::GoogleAds::V16::Services::GoogleAdsService::SearchGoogleAdsStreamRequest;
Google::Ads::GoogleAds::V17::Services::GoogleAdsService::SearchGoogleAdsStreamRequest;

use Getopt::Long qw(:config auto_help);
use Pod::Usage;
Expand Down Expand Up @@ -177,7 177,7 @@ ()
Google::Ads::GoogleAds::Utils::SearchStreamHandler->new({
service => $google_ads_service,
request =>
Google::Ads::GoogleAds::V16::Services::GoogleAdsService::SearchGoogleAdsStreamRequest
Google::Ads::GoogleAds::V17::Services::GoogleAdsService::SearchGoogleAdsStreamRequest
->new({
customerId => $customer_id_to_search,
query => $search_query,
Expand Down
16 changes: 5 additions & 11 deletions examples/account_management/get_change_details.pl
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 27,18 @@
use Google::Ads::GoogleAds::Utils::GoogleAdsHelper;
use Google::Ads::GoogleAds::Utils::SearchGoogleAdsIterator;
use Google::Ads::GoogleAds::Utils::FieldMasks;
use Google::Ads::GoogleAds::V16::Enums::ResourceChangeOperationEnum
use Google::Ads::GoogleAds::V17::Enums::ResourceChangeOperationEnum
qw(CREATE UPDATE);
use Google::Ads::GoogleAds::V16::Enums::ChangeEventResourceTypeEnum
use Google::Ads::GoogleAds::V17::Enums::ChangeEventResourceTypeEnum
qw(AD AD_GROUP AD_GROUP_AD AD_GROUP_ASSET AD_GROUP_CRITERION AD_GROUP_BID_MODIFIER ASSET ASSET_SET ASSET_SET_ASSET CAMPAIGN CAMPAIGN_ASSET CAMPAIGN_ASSET_SET CAMPAIGN_BUDGET CAMPAIGN_CRITERION AD_GROUP_FEED CAMPAIGN_FEED CUSTOMER_ASSET FEED FEED_ITEM);
use
Google::Ads::GoogleAds::V16::Services::GoogleAdsService::SearchGoogleAdsRequest;
Google::Ads::GoogleAds::V17::Services::GoogleAdsService::SearchGoogleAdsRequest;

use Getopt::Long qw(:config auto_help);
use JSON::XS;
use Pod::Usage;
use Cwd qw(abs_path);

use constant PAGE_SIZE => 1000;

# The following parameter(s) should be provided to run the example. You can
# either specify these by changing the INSERT_XXX_ID_HERE values below, or on
# the command line.
Expand Down Expand Up @@ -74,14 72,10 @@ sub get_change_details {
# Create a search Google Ads request that will retrieve all change events using
# pages of the specified page size.
my $search_request =
Google::Ads::GoogleAds::V16::Services::GoogleAdsService::SearchGoogleAdsRequest
Google::Ads::GoogleAds::V17::Services::GoogleAdsService::SearchGoogleAdsRequest
->new({
customerId => $customer_id,
query => $search_query,
# The page size is superfluous with the default limit set above, but it's
# shown here since it's a good practice to use a reasonable page size
# when you set a higher limit.
pageSize => PAGE_SIZE
query => $search_query
});

# Get the GoogleAdsService.
Expand Down
11 changes: 4 additions & 7 deletions examples/account_management/get_change_summary.pl
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 26,15 @@
use Google::Ads::GoogleAds::Client;
use Google::Ads::GoogleAds::Utils::GoogleAdsHelper;
use Google::Ads::GoogleAds::Utils::SearchGoogleAdsIterator;
use Google::Ads::GoogleAds::V16::Enums::ChangeStatusResourceTypeEnum
use Google::Ads::GoogleAds::V17::Enums::ChangeStatusResourceTypeEnum
qw(AD_GROUP AD_GROUP_AD AD_GROUP_CRITERION CAMPAIGN CAMPAIGN_CRITERION FEED FEED_ITEM AD_GROUP_FEED CAMPAIGN_FEED AD_GROUP_BID_MODIFIER);
use
Google::Ads::GoogleAds::V16::Services::GoogleAdsService::SearchGoogleAdsRequest;
Google::Ads::GoogleAds::V17::Services::GoogleAdsService::SearchGoogleAdsRequest;

use Getopt::Long qw(:config auto_help);
use Pod::Usage;
use Cwd qw(abs_path);

use constant PAGE_SIZE => 1000;

# The following parameter(s) should be provided to run the example. You can
# either specify these by changing the INSERT_XXX_ID_HERE values below, or on
# the command line.
Expand Down Expand Up @@ -75,11 73,10 @@ sub get_change_summary {
# Create a search Google Ads request that will retrieve all change statuses using
# pages of the specified page size.
my $search_request =
Google::Ads::GoogleAds::V16::Services::GoogleAdsService::SearchGoogleAdsRequest
Google::Ads::GoogleAds::V17::Services::GoogleAdsService::SearchGoogleAdsRequest
->new({
customerId => $customer_id,
query => $search_query,
pageSize => PAGE_SIZE
query => $search_query
});

# Get the GoogleAdsService.
Expand Down
10 changes: 5 additions & 5 deletions examples/account_management/invite_user_with_access_role.pl
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 25,9 @@
use lib "$Bin/../../lib";
use Google::Ads::GoogleAds::Client;
use Google::Ads::GoogleAds::Utils::GoogleAdsHelper;
use Google::Ads::GoogleAds::V16::Resources::CustomerUserAccessInvitation;
use Google::Ads::GoogleAds::V17::Resources::CustomerUserAccessInvitation;
use
Google::Ads::GoogleAds::V16::Services::CustomerUserAccessInvitationService::CustomerUserAccessInvitationOperation;
Google::Ads::GoogleAds::V17::Services::CustomerUserAccessInvitationService::CustomerUserAccessInvitationOperation;

use Getopt::Long qw(:config auto_help);
use Pod::Usage;
Expand All @@ -43,7 43,7 @@
# Running the example with -h will print the command line usage.
my $customer_id = "INSERT_CUSTOMER_ID_HERE";
my $email_address = "INSERT_EMAIL_ADDRESS_HERE";
# See Google::Ads::GoogleAds::V16::Enums::AccessRoleEnum for optional values.
# See Google::Ads::GoogleAds::V17::Enums::AccessRoleEnum for optional values.
my $access_role = "INSERT_ACCESS_ROLE_HERE";

# [START invite_user_with_access_role]
Expand All @@ -52,14 52,14 @@ sub invite_user_with_access_role {

# Create the user access invitation.
my $user_access_invitation =
Google::Ads::GoogleAds::V16::Resources::CustomerUserAccessInvitation->new({
Google::Ads::GoogleAds::V17::Resources::CustomerUserAccessInvitation->new({
emailAddress => $email_address,
accessRole => $access_role
});

# Create the user access invitation operation.
my $invitation_operation =
Google::Ads::GoogleAds::V16::Services::CustomerUserAccessInvitationService::CustomerUserAccessInvitationOperation
Google::Ads::GoogleAds::V17::Services::CustomerUserAccessInvitationService::CustomerUserAccessInvitationOperation
->new({create => $user_access_invitation});

# Send the user access invitation.
Expand Down
24 changes: 12 additions & 12 deletions examples/account_management/link_manager_to_client.pl
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 26,15 @@
use Google::Ads::GoogleAds::Client;
use Google::Ads::GoogleAds::Utils::GoogleAdsHelper;
use Google::Ads::GoogleAds::Utils::FieldMasks;
use Google::Ads::GoogleAds::V16::Resources::CustomerClientLink;
use Google::Ads::GoogleAds::V16::Resources::CustomerManagerLink;
use Google::Ads::GoogleAds::V16::Enums::ManagerLinkStatusEnum
use Google::Ads::GoogleAds::V17::Resources::CustomerClientLink;
use Google::Ads::GoogleAds::V17::Resources::CustomerManagerLink;
use Google::Ads::GoogleAds::V17::Enums::ManagerLinkStatusEnum
qw(PENDING ACTIVE);
use
Google::Ads::GoogleAds::V16::Services::CustomerClientLinkService::CustomerClientLinkOperation;
Google::Ads::GoogleAds::V17::Services::CustomerClientLinkService::CustomerClientLinkOperation;
use
Google::Ads::GoogleAds::V16::Services::CustomerManagerLinkService::CustomerManagerLinkOperation;
use Google::Ads::GoogleAds::V16::Utils::ResourceNames;
Google::Ads::GoogleAds::V17::Services::CustomerManagerLinkService::CustomerManagerLinkOperation;
use Google::Ads::GoogleAds::V17::Utils::ResourceNames;

use Getopt::Long qw(:config auto_help);
use Pod::Usage;
Expand Down Expand Up @@ -66,16 66,16 @@ sub link_manager_to_client {

# Create a customer client link.
my $api_client_link =
Google::Ads::GoogleAds::V16::Resources::CustomerClientLink->new({
Google::Ads::GoogleAds::V17::Resources::CustomerClientLink->new({
clientCustomer =>
Google::Ads::GoogleAds::V16::Utils::ResourceNames::customer(
Google::Ads::GoogleAds::V17::Utils::ResourceNames::customer(
$api_client_customer_id),
status => PENDING
});

# Create a customer client link operation.
my $api_client_link_operation =
Google::Ads::GoogleAds::V16::Services::CustomerClientLinkService::CustomerClientLinkOperation
Google::Ads::GoogleAds::V17::Services::CustomerClientLinkService::CustomerClientLinkOperation
->new({
create => $api_client_link
});
Expand Down Expand Up @@ -110,7 110,7 @@ sub link_manager_to_client {
$search_response->{results}[0]{customerClientLink}{managerLinkId};

my $manager_link_resource_name =
Google::Ads::GoogleAds::V16::Utils::ResourceNames::customer_manager_link(
Google::Ads::GoogleAds::V17::Utils::ResourceNames::customer_manager_link(
$api_client_customer_id, $manager_customer_id, $manager_link_id);

# Step 3: Accept the manager customer's link invitation while authenticating
Expand All @@ -119,14 119,14 @@ sub link_manager_to_client {

# Create a customer manager link.
my $manager_link =
Google::Ads::GoogleAds::V16::Resources::CustomerManagerLink->new({
Google::Ads::GoogleAds::V17::Resources::CustomerManagerLink->new({
resourceName => $manager_link_resource_name,
status => ACTIVE
});

# Create a customer manager link operation.
my $manager_link_operation =
Google::Ads::GoogleAds::V16::Services::CustomerManagerLinkService::CustomerManagerLinkOperation
Google::Ads::GoogleAds::V17::Services::CustomerManagerLinkService::CustomerManagerLinkOperation
->new({
update => $manager_link,
updateMask => all_set_fields_of($manager_link)});
Expand Down
18 changes: 9 additions & 9 deletions examples/account_management/update_user_access.pl
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 30,12 @@
use Google::Ads::GoogleAds::Utils::GoogleAdsHelper;
use Google::Ads::GoogleAds::Utils::SearchGoogleAdsIterator;
use Google::Ads::GoogleAds::Utils::FieldMasks;
use Google::Ads::GoogleAds::V16::Resources::CustomerUserAccess;
use Google::Ads::GoogleAds::V17::Resources::CustomerUserAccess;
use
Google::Ads::GoogleAds::V16::Services::GoogleAdsService::SearchGoogleAdsRequest;
Google::Ads::GoogleAds::V17::Services::GoogleAdsService::SearchGoogleAdsRequest;
use
Google::Ads::GoogleAds::V16::Services::CustomerUserAccessService::CustomerUserAccessOperation;
use Google::Ads::GoogleAds::V16::Utils::ResourceNames;
Google::Ads::GoogleAds::V17::Services::CustomerUserAccessService::CustomerUserAccessOperation;
use Google::Ads::GoogleAds::V17::Utils::ResourceNames;

use Getopt::Long qw(:config auto_help);
use Pod::Usage;
Expand All @@ -51,7 51,7 @@
# Running the example with -h will print the command line usage.
my $customer_id = "INSERT_CUSTOMER_ID_HERE";
my $email_address = "INSERT_EMAIL_ADDRESS_HERE";
# See Google::Ads::GoogleAds::V16::Enums::AccessRoleEnum for optional values.
# See Google::Ads::GoogleAds::V17::Enums::AccessRoleEnum for optional values.
my $access_role = "INSERT_ACCESS_ROLE_HERE";

sub update_user_access {
Expand Down Expand Up @@ -79,7 79,7 @@ sub get_user_access {

# Create a search Google Ads request that will retrieve the customer user access.
my $search_request =
Google::Ads::GoogleAds::V16::Services::GoogleAdsService::SearchGoogleAdsRequest
Google::Ads::GoogleAds::V17::Services::GoogleAdsService::SearchGoogleAdsRequest
->new({
customerId => $customer_id,
query => $search_query
Expand Down Expand Up @@ -115,17 115,17 @@ sub modify_user_access {

# Create the modified user access.
my $user_access =
Google::Ads::GoogleAds::V16::Resources::CustomerUserAccess->new({
Google::Ads::GoogleAds::V17::Resources::CustomerUserAccess->new({
resourceName =>
Google::Ads::GoogleAds::V16::Utils::ResourceNames::customer_user_access(
Google::Ads::GoogleAds::V17::Utils::ResourceNames::customer_user_access(
$customer_id, $user_id
),
accessRole => $access_role
});

# Create the operation.
my $user_access_operation =
Google::Ads::GoogleAds::V16::Services::CustomerUserAccessService::CustomerUserAccessOperation
Google::Ads::GoogleAds::V17::Services::CustomerUserAccessService::CustomerUserAccessOperation
->new({
update => $user_access,
updateMask => all_set_fields_of($user_access)});
Expand Down
6 changes: 3 additions & 3 deletions examples/account_management/verify_advertiser_identity.pl
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 26,10 @@
use lib "$Bin/../../lib";
use Google::Ads::GoogleAds::Client;
use Google::Ads::GoogleAds::Utils::GoogleAdsHelper;
use Google::Ads::GoogleAds::V16::Enums::IdentityVerificationProgramEnum
use Google::Ads::GoogleAds::V17::Enums::IdentityVerificationProgramEnum
qw (ADVERTISER_IDENTITY_VERIFICATION);
use
Google::Ads::GoogleAds::V16::Services::IdentityVerificationService::StartIdentityVerificationRequest;
Google::Ads::GoogleAds::V17::Services::IdentityVerificationService::StartIdentityVerificationRequest;

use Getopt::Long qw(:config auto_help);
use Pod::Usage;
Expand Down Expand Up @@ -104,7 104,7 @@ sub start_identity_verification {
my ($api_client, $customer_id) = @_;

my $request =
Google::Ads::GoogleAds::V16::Services::IdentityVerificationService::StartIdentityVerificationRequest
Google::Ads::GoogleAds::V17::Services::IdentityVerificationService::StartIdentityVerificationRequest
->new({
customerId => $customer_id,
verificationProgram => ADVERTISER_IDENTITY_VERIFICATION
Expand Down
Loading

0 comments on commit 753da77

Please sign in to comment.