Google-Ads-GoogleAds-Client

 view release on metacpan or  search on metacpan

examples/account_management/update_user_access.pl  view on Meta::CPAN

#
# Parameters passed on the command line will override any parameters set in
# code.
#
# 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::V19::Enums::AccessRoleEnum for optional values.
my $access_role = "INSERT_ACCESS_ROLE_HERE";

sub update_user_access {
  my ($api_client, $customer_id, $email_address, $access_role) = @_;

  my $user_id = get_user_access($api_client, $customer_id, $email_address);
  if (defined $user_id) {
    modify_user_access($api_client, $customer_id, $user_id, $access_role);
  }

  return 1;
}

examples/basic_operations/update_ad_group.pl  view on Meta::CPAN

#
# Parameters passed on the command line will override any parameters set in
# code.
#
# Running the example with -h will print the command line usage.
my $customer_id          = "INSERT_CUSTOMER_ID_HERE";
my $ad_group_id          = "INSERT_AD_GROUP_ID_HERE";
my $cpc_bid_micro_amount = "INSERT_CPC_BID_MICRO_AMOUNT_HERE";

# [START update_ad_group]
sub update_ad_group {
  my ($api_client, $customer_id, $ad_group_id, $cpc_bid_micro_amount) = @_;

  # Create an ad group with the proper resource name and any other changes.
  my $ad_group = Google::Ads::GoogleAds::V19::Resources::AdGroup->new({
      resourceName =>
        Google::Ads::GoogleAds::V19::Utils::ResourceNames::ad_group(
        $customer_id, $ad_group_id
        ),
      status       => PAUSED,
      cpcBidMicros => $cpc_bid_micro_amount

examples/basic_operations/update_campaign.pl  view on Meta::CPAN

# either specify these by changing the INSERT_XXX_ID_HERE values below, or on
# the command line.
#
# Parameters passed on the command line will override any parameters set in
# code.
#
# Running the example with -h will print the command line usage.
my $customer_id = "INSERT_CUSTOMER_ID_HERE";
my $campaign_id = "INSERT_CAMPAIGN_ID_HERE";

sub update_campaign {
  my ($api_client, $customer_id, $campaign_id) = @_;

  # Create a campaign with the proper resource name and any other changes.
  my $campaign = Google::Ads::GoogleAds::V19::Resources::Campaign->new({
      resourceName =>
        Google::Ads::GoogleAds::V19::Utils::ResourceNames::campaign(
        $customer_id, $campaign_id
        ),
      status          => PAUSED,
      networkSettings =>

examples/basic_operations/update_responsive_search_ad.pl  view on Meta::CPAN

# the command line.
#
# Parameters passed on the command line will override any parameters set in
# code.
#
# Running the example with -h will print the command line usage.
my $customer_id = "INSERT_CUSTOMER_ID_HERE";
my $ad_id       = "INSERT_AD_ID_HERE";

# [START update_responsive_search_ad]
sub update_responsive_search_ad {
  my ($api_client, $customer_id, $ad_id) = @_;

  # Create an ad with the proper resource name and any other changes.
  my $ad = Google::Ads::GoogleAds::V19::Resources::Ad->new({
      resourceName => Google::Ads::GoogleAds::V19::Utils::ResourceNames::ad(
        $customer_id, $ad_id
      ),
      responsiveSearchAd =>
        Google::Ads::GoogleAds::V19::Common::ResponsiveSearchAdInfo->new({
          # Update some properties of the responsive search ad.

examples/campaign_management/update_campaign_criterion_bid_modifier.pl  view on Meta::CPAN

# Parameters passed on the command line will override any parameters set in
# code.
#
# Running the example with -h will print the command line usage.
my $customer_id  = "INSERT_CUSTOMER_ID_HERE";
my $campaign_id  = "INSERT_CAMPAIGN_ID_HERE";
my $criterion_id = "INSERT_CRITERION_ID_HERE";
# Specify the bid modifier value here or the default specified below will be used.
my $bid_modifier_value = 1.5;

sub update_campaign_criterion_bid_modifier {
  my ($api_client, $customer_id, $campaign_id, $criterion_id,
    $bid_modifier_value)
    = @_;

  # Create a campaign criterion with the specified resource name and updated bid
  # modifier value.
  my $campaign_criterion =
    Google::Ads::GoogleAds::V19::Resources::CampaignCriterion->new({
      resourceName =>
        Google::Ads::GoogleAds::V19::Utils::ResourceNames::campaign_criterion(

examples/campaign_management/update_campaign_criterion_ip_block.pl  view on Meta::CPAN

# code.
#
# Running the example with -h will print the command line usage.
my $customer_id = "INSERT_CUSTOMER_ID_HERE";
my $campaign_id = "INSERT_CAMPAIGN_ID_HERE";

# ip_block criterion ID
my $CRITERION_ID = "27";
my $ip_block;

sub update_campaign_criterion_ip_block {
  my ($api_client, $customer_id, $campaign_id, $ip_block) = @_;

  my $resource_name =
    Google::Ads::GoogleAds::V19::Utils::ResourceNames::campaign_criterion(
    $customer_id, $campaign_id, $CRITERION_ID,);

  my $operations;
  foreach my $ip (split(',', $ip_block)) {
    # Create a campaign criterion with the specified resource name (ip_block) and
    # IP address which needs to be excluded.

examples/remarketing/update_audience_target_restriction.pl  view on Meta::CPAN

# either specify these by changing the INSERT_XXX_ID_HERE values below, or on
# the command line.
#
# Parameters passed on the command line will override any parameters set in
# code.
#
# Running the example with -h will print the command line usage.
my $customer_id = "INSERT_CUSTOMER_ID_HERE";
my $ad_group_id = "INSERT_AD_GROUP_ID_HERE";

sub update_audience_target_restriction {
  my ($api_client, $customer_id, $ad_group_id) = @_;

  # Create a flag that specifies whether or not we should update the targeting
  # setting. We should only do this if we find an AUDIENCE target restriction
  # with bid_only set to false.
  my $should_update_target_setting = 0;

  # Create an empty TargetingSetting instance.
  my $targeting_setting =
    Google::Ads::GoogleAds::V19::Common::TargetingSetting->new();

lib/Google/Ads/GoogleAds/V18/Services/ProductLinkInvitationService.pm  view on Meta::CPAN

  my $http_method  = 'POST';
  my $request_path =
    'v18/customers/{+customerId}/productLinkInvitations:remove';
  my $response_type =
'Google::Ads::GoogleAds::V18::Services::ProductLinkInvitationService::RemoveProductLinkInvitationResponse';

  return $self->SUPER::call($http_method, $request_path, $request_body,
    $response_type);
}

sub update {
  my $self         = shift;
  my $request_body = shift;
  my $http_method  = 'POST';
  my $request_path =
    'v18/customers/{+customerId}/productLinkInvitations:update';
  my $response_type =
'Google::Ads::GoogleAds::V18::Services::ProductLinkInvitationService::UpdateProductLinkInvitationResponse';

  return $self->SUPER::call($http_method, $request_path, $request_body,
    $response_type);

lib/Google/Ads/GoogleAds/V19/Services/DataLinkService.pm  view on Meta::CPAN

  my $request_body = shift;
  my $http_method  = 'POST';
  my $request_path = 'v19/customers/{+customerId}/dataLinks:remove';
  my $response_type =
'Google::Ads::GoogleAds::V19::Services::DataLinkService::RemoveDataLinkResponse';

  return $self->SUPER::call($http_method, $request_path, $request_body,
    $response_type);
}

sub update {
  my $self         = shift;
  my $request_body = shift;
  my $http_method  = 'POST';
  my $request_path = 'v19/customers/{+customerId}/dataLinks:update';
  my $response_type =
'Google::Ads::GoogleAds::V19::Services::DataLinkService::UpdateDataLinkResponse';

  return $self->SUPER::call($http_method, $request_path, $request_body,
    $response_type);
}

lib/Google/Ads/GoogleAds/V19/Services/ProductLinkInvitationService.pm  view on Meta::CPAN

  my $http_method  = 'POST';
  my $request_path =
    'v19/customers/{+customerId}/productLinkInvitations:remove';
  my $response_type =
'Google::Ads::GoogleAds::V19::Services::ProductLinkInvitationService::RemoveProductLinkInvitationResponse';

  return $self->SUPER::call($http_method, $request_path, $request_body,
    $response_type);
}

sub update {
  my $self         = shift;
  my $request_body = shift;
  my $http_method  = 'POST';
  my $request_path =
    'v19/customers/{+customerId}/productLinkInvitations:update';
  my $response_type =
'Google::Ads::GoogleAds::V19::Services::ProductLinkInvitationService::UpdateProductLinkInvitationResponse';

  return $self->SUPER::call($http_method, $request_path, $request_body,
    $response_type);

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.746 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )