Google-Ads-AdWords-Client

 view release on metacpan or  search on metacpan

lib/Google/Ads/AdWords/Constants.pm  view on Meta::CPAN

# Copyright 2011, Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Module to store package-level constants and default values.

package Google::Ads::AdWords::Constants;

use strict;
use warnings;
use version;

use File::HomeDir;
use File::Spec::Functions;

# Main version number that the rest of the modules pick up off of.
our $VERSION = qv("5.8.2");

use constant DEFAULT_PROPERTIES_FILE =>
  catfile(File::HomeDir->my_home, "adwords.properties");
use constant DEFAULT_USER_AGENT => "unknown";

# In this format string, the first %s is the URL prefix, the second is the
# version, and the third is service name.
use constant PROXY_FORMAT_STRING => "%s/api/adwords/%s/%s/%s";

# Default current version used if the client is created without the version
# parameter.
use constant DEFAULT_VERSION => "v201809";

# Default alternate URL that points to production servers.
use constant DEFAULT_ALTERNATE_URL => "https://adwords.google.com";

# Default validation header value passed to the servers.
use constant DEFAULT_VALIDATE_ONLY => "false";

# Default OAuth scope for AdWords
use constant DEFAULT_OAUTH_SCOPE => "https://www.googleapis.com/auth/adwords";

# Maximum number of request stats to keep in memory, any overflow will result
# on droppping older requests stats out of memory.
use constant MAX_NUM_OF_REQUEST_STATS => 500;

# Mapping of services to namespace group, required to figure out the service
# url endpoints.
our %SERVICE_TO_GROUP = (
  AccountLabelService             => "mcm",
  AdCustomizerFeedService         => "cm",
  AdGroupAdService                => "cm",
  AdGroupBidModifierService       => "cm",
  AdGroupCriterionService         => "cm",
  AdGroupExtensionSettingService  => "cm",
  AdGroupFeedService              => "cm",
  AdGroupService                  => "cm",
  AdParamService                  => "cm",
  AdService                       => "cm",
  AdwordsUserListService          => "rm",
  AlertService                    => "mcm",
  AssetService                    => "cm",
  BatchJobService                 => 'cm',
  BiddingStrategyService          => "cm",
  BudgetOrderService              => "billing",
  BudgetService                   => "cm",
  CampaignAdExtensionService      => "cm",
  CampaignBidModifierService      => "cm",
  CampaignCriterionService        => "cm",
  CampaignExtensionSettingService => "cm",
  CampaignFeedService             => "cm",
  CampaignGroupService            => "cm",
  CampaignGroupPerformanceTargetService => "cm",
  CampaignService                 => "cm",
  CampaignSharedSetService        => "cm",
  ConstantDataService             => "cm",
  ConversionTrackerService        => "cm",
  CustomAffinityService           => "rm",
  CustomerService                 => "mcm",
  CustomerExtensionSettingService => "cm",
  CustomerFeedService             => "cm",
  CustomerSyncService             => "ch",
  CustomerNegativeCriterionService => "cm",
  DataService                     => "cm",
  DraftAsyncErrorService          => "cm",
  DraftService                    => "cm",
  ExperimentService               => "cm",
  FeedItemService                 => "cm",
  FeedItemTargetService           => "cm",
  FeedMappingService              => "cm",
  FeedService                     => "cm",
  GeoLocationService              => "cm",
  LabelService                    => "cm",
  LocationCriterionService        => "cm",
  ManagedCustomerService          => "mcm",
  MediaService                    => "cm",
  OfflineCallConversionFeedService => "cm",
  OfflineConversionAdjustmentFeedService => "cm",
  OfflineConversionFeedService    => "cm",
  OfflineDataUploadService        => "rm",
  ReportDefinitionService         => "cm",
  SharedCriterionService          => "cm",
  SharedSetService                => "cm",
  TargetingIdeaService            => "o",
  TrafficEstimatorService         => "o",
  TrialAsyncErrorService          => "cm",
  TrialService                    => "cm"
);



( run in 0.638 second using v1.01-cache-2.11-cpan-4ab04211f4c )