Skip to content

Commit

Permalink
Release for Google Ads API V5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wfansh committed Aug 31, 2020
1 parent 9eef6ea commit 90fe222
Show file tree
Hide file tree
Showing 1,319 changed files with 46,164 additions and 1,799 deletions.
2 changes: 1 addition & 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 => "4.0.0",
dist_version => "5.0.0",
requires => {
"Class::Load" => 0,
"Class::Std::Fast" => 0,
Expand Down
6 changes: 6 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
5.0.0 - 2020-08-31
- Added support for Google Ads API v5_0.
- Added code examples: add_logical_user_list, add_combined_rule_user_list,
add_expression_rule_user_list, add_conversion_based_user_list, add_geo_target,
add_billing_setup, etc.

4.0.0 - 2020-07-13
- Added support for Google Ads API v4_0.
- Renamed MutateJobService to BatchJobService.
Expand Down
10 changes: 5 additions & 5 deletions examples/account_management/approve_merchant_center_link.pl
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
use Google::Ads::GoogleAds::Client;
use Google::Ads::GoogleAds::Utils::GoogleAdsHelper;
use Google::Ads::GoogleAds::Utils::FieldMasks;
use Google::Ads::GoogleAds::V4::Resources::MerchantCenterLink;
use Google::Ads::GoogleAds::V4::Enums::MerchantCenterLinkStatusEnum
use Google::Ads::GoogleAds::V5::Resources::MerchantCenterLink;
use Google::Ads::GoogleAds::V5::Enums::MerchantCenterLinkStatusEnum
qw(ENABLED PENDING);
use
Google::Ads::GoogleAds::V4::Services::MerchantCenterLinkService::MerchantCenterLinkOperation;
Google::Ads::GoogleAds::V5::Services::MerchantCenterLinkService::MerchantCenterLinkOperation;

use Getopt::Long qw(:config auto_help);
use Pod::Usage;
Expand Down Expand Up @@ -100,7 +100,7 @@ sub update_merchant_center_link_status {
# Create an updated MerchantCenterLink object derived from the original, but
# with the specified status.
my $merchant_center_link_to_update =
Google::Ads::GoogleAds::V4::Resources::MerchantCenterLink->new({
Google::Ads::GoogleAds::V5::Resources::MerchantCenterLink->new({
resourceName => $merchant_center_link->{resourceName},
status => $new_merchant_center_link_status
});
Expand All @@ -109,7 +109,7 @@ sub update_merchant_center_link_status {
# FieldMasks utility to derive the update mask. This mask tells the Google Ads
# API which attributes of the Merchant Center link you want to change.
my $merchant_center_link_operation =
Google::Ads::GoogleAds::V4::Services::MerchantCenterLinkService::MerchantCenterLinkOperation
Google::Ads::GoogleAds::V5::Services::MerchantCenterLinkService::MerchantCenterLinkOperation
->new({
update => $merchant_center_link_to_update,
updateMask => all_set_fields_of($merchant_center_link_to_update)});
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::V4::Resources::Customer;
use Google::Ads::GoogleAds::V5::Resources::Customer;

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

# Initialize a customer to be created.
my $customer = Google::Ads::GoogleAds::V4::Resources::Customer->new({
my $customer = Google::Ads::GoogleAds::V5::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
6 changes: 3 additions & 3 deletions examples/account_management/get_account_changes.pl
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
use Google::Ads::GoogleAds::Client;
use Google::Ads::GoogleAds::Utils::GoogleAdsHelper;
use Google::Ads::GoogleAds::Utils::SearchGoogleAdsIterator;
use Google::Ads::GoogleAds::V4::Enums::ChangeStatusResourceTypeEnum
use Google::Ads::GoogleAds::V5::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::V4::Services::GoogleAdsService::SearchGoogleAdsRequest;
Google::Ads::GoogleAds::V5::Services::GoogleAdsService::SearchGoogleAdsRequest;

use Getopt::Long qw(:config auto_help);
use Pod::Usage;
Expand Down Expand Up @@ -71,7 +71,7 @@ sub get_account_changes {
# 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::V4::Services::GoogleAdsService::SearchGoogleAdsRequest
Google::Ads::GoogleAds::V5::Services::GoogleAdsService::SearchGoogleAdsRequest
->new({
customerId => $customer_id,
query => $search_query,
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::V4::Services::GoogleAdsService::SearchGoogleAdsStreamRequest;
Google::Ads::GoogleAds::V5::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::V4::Services::GoogleAdsService::SearchGoogleAdsStreamRequest
Google::Ads::GoogleAds::V5::Services::GoogleAdsService::SearchGoogleAdsStreamRequest
->new({
customerId => $customer_id_to_search,
query => $search_query,
Expand Down
4 changes: 2 additions & 2 deletions examples/account_management/get_account_information.pl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
use lib "$Bin/../../lib";
use Google::Ads::GoogleAds::Client;
use Google::Ads::GoogleAds::Utils::GoogleAdsHelper;
use Google::Ads::GoogleAds::V4::Utils::ResourceNames;
use Google::Ads::GoogleAds::V5::Utils::ResourceNames;

use Getopt::Long qw(:config auto_help);
use Pod::Usage;
Expand All @@ -45,7 +45,7 @@ sub get_account_information {
my ($api_client, $customer_id) = @_;

my $resource_name =
Google::Ads::GoogleAds::V4::Utils::ResourceNames::customer($customer_id);
Google::Ads::GoogleAds::V5::Utils::ResourceNames::customer($customer_id);

my $customer =
$api_client->CustomerService()->get({resourceName => $resource_name});
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,14 +26,14 @@
use Google::Ads::GoogleAds::Client;
use Google::Ads::GoogleAds::Utils::GoogleAdsHelper;
use Google::Ads::GoogleAds::Utils::FieldMasks;
use Google::Ads::GoogleAds::V4::Resources::CustomerClientLink;
use Google::Ads::GoogleAds::V4::Resources::CustomerManagerLink;
use Google::Ads::GoogleAds::V4::Enums::ManagerLinkStatusEnum qw(PENDING ACTIVE);
use Google::Ads::GoogleAds::V5::Resources::CustomerClientLink;
use Google::Ads::GoogleAds::V5::Resources::CustomerManagerLink;
use Google::Ads::GoogleAds::V5::Enums::ManagerLinkStatusEnum qw(PENDING ACTIVE);
use
Google::Ads::GoogleAds::V4::Services::CustomerClientLinkService::CustomerClientLinkOperation;
Google::Ads::GoogleAds::V5::Services::CustomerClientLinkService::CustomerClientLinkOperation;
use
Google::Ads::GoogleAds::V4::Services::CustomerManagerLinkService::CustomerManagerLinkOperation;
use Google::Ads::GoogleAds::V4::Utils::ResourceNames;
Google::Ads::GoogleAds::V5::Services::CustomerManagerLinkService::CustomerManagerLinkOperation;
use Google::Ads::GoogleAds::V5::Utils::ResourceNames;

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

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

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

my $manager_link_resource_name =
Google::Ads::GoogleAds::V4::Utils::ResourceNames::customer_manager_link(
Google::Ads::GoogleAds::V5::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 @@ -117,14 +117,14 @@ sub link_manager_to_client {

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

# Create a customer manager link operation.
my $manager_link_operation =
Google::Ads::GoogleAds::V4::Services::CustomerManagerLinkService::CustomerManagerLinkOperation
Google::Ads::GoogleAds::V5::Services::CustomerManagerLinkService::CustomerManagerLinkOperation
->new({
update => $manager_link,
updateMask => all_set_fields_of($manager_link)});
Expand Down
4 changes: 2 additions & 2 deletions examples/account_management/reject_merchant_center_link.pl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
use Google::Ads::GoogleAds::Client;
use Google::Ads::GoogleAds::Utils::GoogleAdsHelper;
use
Google::Ads::GoogleAds::V4::Services::MerchantCenterLinkService::MerchantCenterLinkOperation;
Google::Ads::GoogleAds::V5::Services::MerchantCenterLinkService::MerchantCenterLinkOperation;

use Getopt::Long qw(:config auto_help);
use Pod::Usage;
Expand Down Expand Up @@ -90,7 +90,7 @@ sub remove_merchant_center_link {

# Create a single remove operation, specifying the Merchant Center link resource name.
my $merchant_center_link_operation =
Google::Ads::GoogleAds::V4::Services::MerchantCenterLinkService::MerchantCenterLinkOperation
Google::Ads::GoogleAds::V5::Services::MerchantCenterLinkService::MerchantCenterLinkOperation
->new({
remove => $merchant_center_link->{resourceName}});

Expand Down
Loading

0 comments on commit 90fe222

Please sign in to comment.