google-adwords-api 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README +178 -0
- data/Rakefile +117 -0
- data/adwords_api.yml +21 -0
- data/examples/v200909/add_ad_extension_override.rb +91 -0
- data/examples/v200909/add_ad_group.rb +98 -0
- data/examples/v200909/add_ad_group_criteria.rb +117 -0
- data/examples/v200909/add_ads.rb +129 -0
- data/examples/v200909/add_campaign.rb +101 -0
- data/examples/v200909/add_campaign_ad_extension.rb +130 -0
- data/examples/v200909/add_negative_campaign_criterion.rb +96 -0
- data/examples/v200909/check_campaigns.rb +132 -0
- data/examples/v200909/delete_ad.rb +94 -0
- data/examples/v200909/delete_ad_group.rb +86 -0
- data/examples/v200909/delete_ad_group_criterion.rb +95 -0
- data/examples/v200909/delete_campaign.rb +87 -0
- data/examples/v200909/get_all_active_ad_group_criteria.rb +93 -0
- data/examples/v200909/get_all_ad_extension_overrides.rb +91 -0
- data/examples/v200909/get_all_ad_group_criteria.rb +91 -0
- data/examples/v200909/get_all_ad_groups.rb +88 -0
- data/examples/v200909/get_all_ad_params.rb +89 -0
- data/examples/v200909/get_all_ads.rb +88 -0
- data/examples/v200909/get_all_campaign_ad_extensions.rb +90 -0
- data/examples/v200909/get_all_campaign_targets.rb +83 -0
- data/examples/v200909/get_all_campaigns.rb +83 -0
- data/examples/v200909/get_all_disapproved_ads.rb +94 -0
- data/examples/v200909/get_all_paused_campaigns.rb +86 -0
- data/examples/v200909/get_conversion_optimizer_eligibility.rb +112 -0
- data/examples/v200909/get_geo_location_info.rb +108 -0
- data/examples/v200909/get_method_cost.rb +96 -0
- data/examples/v200909/get_operation_count.rb +88 -0
- data/examples/v200909/get_related_keywords.rb +115 -0
- data/examples/v200909/get_related_placements.rb +114 -0
- data/examples/v200909/get_total_usage_units_per_month.rb +83 -0
- data/examples/v200909/get_unit_count.rb +88 -0
- data/examples/v200909/perform_bulk_mutate_job.rb +221 -0
- data/examples/v200909/set_ad_params.rb +124 -0
- data/examples/v200909/set_campaign_targets.rb +125 -0
- data/examples/v200909/update_ad.rb +95 -0
- data/examples/v200909/update_ad_group.rb +90 -0
- data/examples/v200909/update_ad_group_criterion.rb +108 -0
- data/examples/v200909/update_campaign.rb +93 -0
- data/examples/v201003/add_ad_extension_override.rb +91 -0
- data/examples/v201003/add_ad_group.rb +98 -0
- data/examples/v201003/add_ad_group_criteria.rb +117 -0
- data/examples/v201003/add_ads.rb +182 -0
- data/examples/v201003/add_campaign.rb +101 -0
- data/examples/v201003/add_campaign_ad_extension.rb +130 -0
- data/examples/v201003/add_keywords_performance_report_definition.rb +108 -0
- data/examples/v201003/add_negative_campaign_criterion.rb +96 -0
- data/examples/v201003/check_campaigns.rb +132 -0
- data/examples/v201003/delete_ad.rb +94 -0
- data/examples/v201003/delete_ad_group.rb +86 -0
- data/examples/v201003/delete_ad_group_criterion.rb +95 -0
- data/examples/v201003/delete_campaign.rb +87 -0
- data/examples/v201003/download_report.rb +71 -0
- data/examples/v201003/get_all_active_ad_group_criteria.rb +93 -0
- data/examples/v201003/get_all_ad_extension_overrides.rb +91 -0
- data/examples/v201003/get_all_ad_group_criteria.rb +91 -0
- data/examples/v201003/get_all_ad_groups.rb +88 -0
- data/examples/v201003/get_all_ad_params.rb +89 -0
- data/examples/v201003/get_all_ads.rb +91 -0
- data/examples/v201003/get_all_campaign_ad_extensions.rb +90 -0
- data/examples/v201003/get_all_campaign_targets.rb +83 -0
- data/examples/v201003/get_all_campaigns.rb +83 -0
- data/examples/v201003/get_all_disapproved_ads.rb +94 -0
- data/examples/v201003/get_all_images.rb +88 -0
- data/examples/v201003/get_all_paused_campaigns.rb +86 -0
- data/examples/v201003/get_all_report_definitions.rb +84 -0
- data/examples/v201003/get_all_videos.rb +85 -0
- data/examples/v201003/get_conversion_optimizer_eligibility.rb +112 -0
- data/examples/v201003/get_criterion_bid_landscape.rb +105 -0
- data/examples/v201003/get_geo_location_info.rb +108 -0
- data/examples/v201003/get_method_cost.rb +96 -0
- data/examples/v201003/get_operation_count.rb +88 -0
- data/examples/v201003/get_related_keywords.rb +115 -0
- data/examples/v201003/get_related_placements.rb +114 -0
- data/examples/v201003/get_report_fields.rb +81 -0
- data/examples/v201003/get_total_usage_units_per_month.rb +83 -0
- data/examples/v201003/get_unit_count.rb +88 -0
- data/examples/v201003/perform_bulk_mutate_job.rb +221 -0
- data/examples/v201003/set_ad_params.rb +124 -0
- data/examples/v201003/set_campaign_targets.rb +125 -0
- data/examples/v201003/update_ad.rb +95 -0
- data/examples/v201003/update_ad_group.rb +90 -0
- data/examples/v201003/update_ad_group_criterion.rb +108 -0
- data/examples/v201003/update_campaign.rb +92 -0
- data/examples/v201003/upload_image.rb +97 -0
- data/examples/v201008/add_ad_extension_override.rb +91 -0
- data/examples/v201008/add_ad_group.rb +98 -0
- data/examples/v201008/add_ad_group_criteria.rb +117 -0
- data/examples/v201008/add_ads.rb +182 -0
- data/examples/v201008/add_campaign.rb +101 -0
- data/examples/v201008/add_campaign_ad_extension.rb +130 -0
- data/examples/v201008/add_experiment.rb +162 -0
- data/examples/v201008/add_keywords_performance_report_definition.rb +108 -0
- data/examples/v201008/add_negative_campaign_criterion.rb +96 -0
- data/examples/v201008/add_user_list.rb +96 -0
- data/examples/v201008/check_campaigns.rb +132 -0
- data/examples/v201008/delete_ad.rb +94 -0
- data/examples/v201008/delete_ad_group.rb +86 -0
- data/examples/v201008/delete_ad_group_criterion.rb +95 -0
- data/examples/v201008/delete_bulk_mutate_job.rb +96 -0
- data/examples/v201008/delete_campaign.rb +87 -0
- data/examples/v201008/delete_experiment.rb +87 -0
- data/examples/v201008/delete_user_list.rb +87 -0
- data/examples/v201008/download_report.rb +71 -0
- data/examples/v201008/get_account_hierarchy.rb +112 -0
- data/examples/v201008/get_all_account_changes.rb +144 -0
- data/examples/v201008/get_all_active_ad_group_criteria.rb +93 -0
- data/examples/v201008/get_all_ad_extension_overrides.rb +91 -0
- data/examples/v201008/get_all_ad_group_criteria.rb +91 -0
- data/examples/v201008/get_all_ad_groups.rb +88 -0
- data/examples/v201008/get_all_ad_params.rb +89 -0
- data/examples/v201008/get_all_ads.rb +91 -0
- data/examples/v201008/get_all_campaign_ad_extensions.rb +90 -0
- data/examples/v201008/get_all_campaign_targets.rb +83 -0
- data/examples/v201008/get_all_campaigns.rb +83 -0
- data/examples/v201008/get_all_disapproved_ads.rb +94 -0
- data/examples/v201008/get_all_experiments.rb +93 -0
- data/examples/v201008/get_all_images.rb +88 -0
- data/examples/v201008/get_all_paused_campaigns.rb +86 -0
- data/examples/v201008/get_all_report_definitions.rb +84 -0
- data/examples/v201008/get_all_user_lists.rb +84 -0
- data/examples/v201008/get_all_videos.rb +85 -0
- data/examples/v201008/get_bulk_mutate_job.rb +106 -0
- data/examples/v201008/get_campaign_alerts.rb +103 -0
- data/examples/v201008/get_conversion_optimizer_eligibility.rb +97 -0
- data/examples/v201008/get_criterion_bid_landscape.rb +105 -0
- data/examples/v201008/get_geo_location_info.rb +108 -0
- data/examples/v201008/get_method_cost.rb +96 -0
- data/examples/v201008/get_operation_count.rb +88 -0
- data/examples/v201008/get_related_keywords.rb +115 -0
- data/examples/v201008/get_related_placements.rb +114 -0
- data/examples/v201008/get_report_fields.rb +81 -0
- data/examples/v201008/get_total_usage_units_per_month.rb +83 -0
- data/examples/v201008/get_traffic_estimates.rb +156 -0
- data/examples/v201008/get_unit_count.rb +88 -0
- data/examples/v201008/handle_partial_failures.rb +135 -0
- data/examples/v201008/handle_policy_violation_error.rb +146 -0
- data/examples/v201008/perform_bulk_mutate_job.rb +221 -0
- data/examples/v201008/promote_experiment.rb +88 -0
- data/examples/v201008/set_ad_params.rb +124 -0
- data/examples/v201008/set_campaign_targets.rb +125 -0
- data/examples/v201008/update_ad.rb +95 -0
- data/examples/v201008/update_ad_group.rb +90 -0
- data/examples/v201008/update_ad_group_criterion.rb +108 -0
- data/examples/v201008/update_campaign.rb +93 -0
- data/examples/v201008/update_user_list.rb +91 -0
- data/examples/v201008/upload_image.rb +97 -0
- data/examples/v201101/add_ad_extension_override.rb +91 -0
- data/examples/v201101/add_ad_group.rb +98 -0
- data/examples/v201101/add_ad_group_criteria.rb +117 -0
- data/examples/v201101/add_ads.rb +182 -0
- data/examples/v201101/add_campaign.rb +108 -0
- data/examples/v201101/add_campaign_ad_extension.rb +130 -0
- data/examples/v201101/add_experiment.rb +162 -0
- data/examples/v201101/add_keywords_performance_report_definition.rb +108 -0
- data/examples/v201101/add_mcc_report_definition.rb +103 -0
- data/examples/v201101/add_negative_campaign_criterion.rb +96 -0
- data/examples/v201101/add_user_list.rb +96 -0
- data/examples/v201101/check_campaigns.rb +132 -0
- data/examples/v201101/delete_ad.rb +94 -0
- data/examples/v201101/delete_ad_group.rb +86 -0
- data/examples/v201101/delete_ad_group_criterion.rb +95 -0
- data/examples/v201101/delete_bulk_mutate_job.rb +96 -0
- data/examples/v201101/delete_campaign.rb +87 -0
- data/examples/v201101/delete_experiment.rb +87 -0
- data/examples/v201101/delete_user_list.rb +87 -0
- data/examples/v201101/download_mcc_report.rb +93 -0
- data/examples/v201101/download_report.rb +71 -0
- data/examples/v201101/get_account_hierarchy.rb +112 -0
- data/examples/v201101/get_ad_group_bid_landscape.rb +103 -0
- data/examples/v201101/get_all_account_changes.rb +146 -0
- data/examples/v201101/get_all_active_ad_group_criteria.rb +106 -0
- data/examples/v201101/get_all_ad_extension_overrides.rb +91 -0
- data/examples/v201101/get_all_ad_group_criteria.rb +97 -0
- data/examples/v201101/get_all_ad_groups.rb +94 -0
- data/examples/v201101/get_all_ad_params.rb +89 -0
- data/examples/v201101/get_all_ads.rb +99 -0
- data/examples/v201101/get_all_campaign_ad_extensions.rb +96 -0
- data/examples/v201101/get_all_campaign_targets.rb +83 -0
- data/examples/v201101/get_all_campaigns.rb +86 -0
- data/examples/v201101/get_all_disapproved_ads.rb +102 -0
- data/examples/v201101/get_all_experiments.rb +98 -0
- data/examples/v201101/get_all_images.rb +90 -0
- data/examples/v201101/get_all_paused_campaigns.rb +92 -0
- data/examples/v201101/get_all_report_definitions.rb +84 -0
- data/examples/v201101/get_all_user_lists.rb +87 -0
- data/examples/v201101/get_all_videos.rb +87 -0
- data/examples/v201101/get_bulk_mutate_job.rb +106 -0
- data/examples/v201101/get_campaign_alerts.rb +103 -0
- data/examples/v201101/get_conversion_optimizer_eligibility.rb +102 -0
- data/examples/v201101/get_criterion_bid_landscape.rb +102 -0
- data/examples/v201101/get_geo_location_info.rb +108 -0
- data/examples/v201101/get_method_cost.rb +96 -0
- data/examples/v201101/get_operation_count.rb +88 -0
- data/examples/v201101/get_related_keywords.rb +115 -0
- data/examples/v201101/get_related_placements.rb +114 -0
- data/examples/v201101/get_report_fields.rb +81 -0
- data/examples/v201101/get_total_usage_units_per_month.rb +83 -0
- data/examples/v201101/get_traffic_estimates.rb +157 -0
- data/examples/v201101/get_unit_count.rb +88 -0
- data/examples/v201101/handle_partial_failures.rb +135 -0
- data/examples/v201101/handle_policy_violation_error.rb +146 -0
- data/examples/v201101/perform_bulk_mutate_job.rb +221 -0
- data/examples/v201101/promote_experiment.rb +88 -0
- data/examples/v201101/set_ad_params.rb +124 -0
- data/examples/v201101/set_campaign_targets.rb +111 -0
- data/examples/v201101/update_ad.rb +95 -0
- data/examples/v201101/update_ad_group.rb +90 -0
- data/examples/v201101/update_ad_group_criterion.rb +108 -0
- data/examples/v201101/update_campaign.rb +93 -0
- data/examples/v201101/update_user_list.rb +91 -0
- data/examples/v201101/upload_image.rb +97 -0
- data/lib/adwords_api.rb +273 -0
- data/lib/adwords_api/api_config.rb +270 -0
- data/lib/adwords_api/auth/v13_login_handler.rb +36 -0
- data/lib/adwords_api/credential_handler.rb +111 -0
- data/lib/adwords_api/errors.rb +85 -0
- data/lib/adwords_api/extensions.rb +245 -0
- data/lib/adwords_api/soap4r_response_handler.rb +121 -0
- data/lib/adwords_api/utils.rb +80 -0
- data/lib/adwords_api/v13/AccountService.rb +321 -0
- data/lib/adwords_api/v13/AccountServiceDriver.rb +87 -0
- data/lib/adwords_api/v13/AccountServiceMappingRegistry.rb +337 -0
- data/lib/adwords_api/v13/AccountServiceWrapper.rb +407 -0
- data/lib/adwords_api/v13/ReportService.rb +328 -0
- data/lib/adwords_api/v13/ReportServiceDriver.rb +103 -0
- data/lib/adwords_api/v13/ReportServiceMappingRegistry.rb +298 -0
- data/lib/adwords_api/v13/ReportServiceWrapper.rb +500 -0
- data/lib/adwords_api/v13/TrafficEstimatorService.rb +414 -0
- data/lib/adwords_api/v13/TrafficEstimatorServiceDriver.rb +79 -0
- data/lib/adwords_api/v13/TrafficEstimatorServiceMappingRegistry.rb +491 -0
- data/lib/adwords_api/v13/TrafficEstimatorServiceWrapper.rb +402 -0
- data/lib/adwords_api/v200909/AdExtensionOverrideService.rb +1105 -0
- data/lib/adwords_api/v200909/AdExtensionOverrideServiceDriver.rb +63 -0
- data/lib/adwords_api/v200909/AdExtensionOverrideServiceMappingRegistry.rb +1265 -0
- data/lib/adwords_api/v200909/AdExtensionOverrideServiceWrapper.rb +332 -0
- data/lib/adwords_api/v200909/AdGroupAdService.rb +2603 -0
- data/lib/adwords_api/v200909/AdGroupAdServiceDriver.rb +63 -0
- data/lib/adwords_api/v200909/AdGroupAdServiceMappingRegistry.rb +2755 -0
- data/lib/adwords_api/v200909/AdGroupAdServiceWrapper.rb +332 -0
- data/lib/adwords_api/v200909/AdGroupCriterionService.rb +1577 -0
- data/lib/adwords_api/v200909/AdGroupCriterionServiceDriver.rb +63 -0
- data/lib/adwords_api/v200909/AdGroupCriterionServiceMappingRegistry.rb +1821 -0
- data/lib/adwords_api/v200909/AdGroupCriterionServiceWrapper.rb +332 -0
- data/lib/adwords_api/v200909/AdGroupService.rb +1251 -0
- data/lib/adwords_api/v200909/AdGroupServiceDriver.rb +63 -0
- data/lib/adwords_api/v200909/AdGroupServiceMappingRegistry.rb +1395 -0
- data/lib/adwords_api/v200909/AdGroupServiceWrapper.rb +332 -0
- data/lib/adwords_api/v200909/AdParamService.rb +765 -0
- data/lib/adwords_api/v200909/AdParamServiceDriver.rb +63 -0
- data/lib/adwords_api/v200909/AdParamServiceMappingRegistry.rb +927 -0
- data/lib/adwords_api/v200909/AdParamServiceWrapper.rb +332 -0
- data/lib/adwords_api/v200909/BulkMutateJobService.rb +4778 -0
- data/lib/adwords_api/v200909/BulkMutateJobServiceDriver.rb +63 -0
- data/lib/adwords_api/v200909/BulkMutateJobServiceMappingRegistry.rb +5077 -0
- data/lib/adwords_api/v200909/BulkMutateJobServiceWrapper.rb +332 -0
- data/lib/adwords_api/v200909/CampaignAdExtensionService.rb +1065 -0
- data/lib/adwords_api/v200909/CampaignAdExtensionServiceDriver.rb +63 -0
- data/lib/adwords_api/v200909/CampaignAdExtensionServiceMappingRegistry.rb +1273 -0
- data/lib/adwords_api/v200909/CampaignAdExtensionServiceWrapper.rb +332 -0
- data/lib/adwords_api/v200909/CampaignCriterionService.rb +1019 -0
- data/lib/adwords_api/v200909/CampaignCriterionServiceDriver.rb +63 -0
- data/lib/adwords_api/v200909/CampaignCriterionServiceMappingRegistry.rb +1237 -0
- data/lib/adwords_api/v200909/CampaignCriterionServiceWrapper.rb +332 -0
- data/lib/adwords_api/v200909/CampaignService.rb +1633 -0
- data/lib/adwords_api/v200909/CampaignServiceDriver.rb +63 -0
- data/lib/adwords_api/v200909/CampaignServiceMappingRegistry.rb +1785 -0
- data/lib/adwords_api/v200909/CampaignServiceWrapper.rb +332 -0
- data/lib/adwords_api/v200909/CampaignTargetService.rb +1435 -0
- data/lib/adwords_api/v200909/CampaignTargetServiceDriver.rb +63 -0
- data/lib/adwords_api/v200909/CampaignTargetServiceMappingRegistry.rb +1569 -0
- data/lib/adwords_api/v200909/CampaignTargetServiceWrapper.rb +332 -0
- data/lib/adwords_api/v200909/GeoLocationService.rb +611 -0
- data/lib/adwords_api/v200909/GeoLocationServiceDriver.rb +55 -0
- data/lib/adwords_api/v200909/GeoLocationServiceMappingRegistry.rb +771 -0
- data/lib/adwords_api/v200909/GeoLocationServiceWrapper.rb +303 -0
- data/lib/adwords_api/v200909/InfoService.rb +605 -0
- data/lib/adwords_api/v200909/InfoServiceDriver.rb +55 -0
- data/lib/adwords_api/v200909/InfoServiceMappingRegistry.rb +764 -0
- data/lib/adwords_api/v200909/InfoServiceWrapper.rb +303 -0
- data/lib/adwords_api/v200909/TargetingIdeaService.rb +2253 -0
- data/lib/adwords_api/v200909/TargetingIdeaServiceDriver.rb +63 -0
- data/lib/adwords_api/v200909/TargetingIdeaServiceMappingRegistry.rb +2688 -0
- data/lib/adwords_api/v200909/TargetingIdeaServiceWrapper.rb +335 -0
- data/lib/adwords_api/v201003/AdExtensionOverrideService.rb +1301 -0
- data/lib/adwords_api/v201003/AdExtensionOverrideServiceDriver.rb +63 -0
- data/lib/adwords_api/v201003/AdExtensionOverrideServiceMappingRegistry.rb +1468 -0
- data/lib/adwords_api/v201003/AdExtensionOverrideServiceWrapper.rb +332 -0
- data/lib/adwords_api/v201003/AdGroupAdService.rb +2909 -0
- data/lib/adwords_api/v201003/AdGroupAdServiceDriver.rb +63 -0
- data/lib/adwords_api/v201003/AdGroupAdServiceMappingRegistry.rb +2970 -0
- data/lib/adwords_api/v201003/AdGroupAdServiceWrapper.rb +332 -0
- data/lib/adwords_api/v201003/AdGroupCriterionService.rb +1762 -0
- data/lib/adwords_api/v201003/AdGroupCriterionServiceDriver.rb +63 -0
- data/lib/adwords_api/v201003/AdGroupCriterionServiceMappingRegistry.rb +1978 -0
- data/lib/adwords_api/v201003/AdGroupCriterionServiceWrapper.rb +332 -0
- data/lib/adwords_api/v201003/AdGroupService.rb +1421 -0
- data/lib/adwords_api/v201003/AdGroupServiceDriver.rb +63 -0
- data/lib/adwords_api/v201003/AdGroupServiceMappingRegistry.rb +1546 -0
- data/lib/adwords_api/v201003/AdGroupServiceWrapper.rb +332 -0
- data/lib/adwords_api/v201003/AdParamService.rb +859 -0
- data/lib/adwords_api/v201003/AdParamServiceDriver.rb +63 -0
- data/lib/adwords_api/v201003/AdParamServiceMappingRegistry.rb +1002 -0
- data/lib/adwords_api/v201003/AdParamServiceWrapper.rb +332 -0
- data/lib/adwords_api/v201003/BidLandscapeService.rb +847 -0
- data/lib/adwords_api/v201003/BidLandscapeServiceDriver.rb +55 -0
- data/lib/adwords_api/v201003/BidLandscapeServiceMappingRegistry.rb +958 -0
- data/lib/adwords_api/v201003/BidLandscapeServiceWrapper.rb +306 -0
- data/lib/adwords_api/v201003/BulkMutateJobService.rb +5401 -0
- data/lib/adwords_api/v201003/BulkMutateJobServiceDriver.rb +63 -0
- data/lib/adwords_api/v201003/BulkMutateJobServiceMappingRegistry.rb +5600 -0
- data/lib/adwords_api/v201003/BulkMutateJobServiceWrapper.rb +332 -0
- data/lib/adwords_api/v201003/CampaignAdExtensionService.rb +1255 -0
- data/lib/adwords_api/v201003/CampaignAdExtensionServiceDriver.rb +63 -0
- data/lib/adwords_api/v201003/CampaignAdExtensionServiceMappingRegistry.rb +1452 -0
- data/lib/adwords_api/v201003/CampaignAdExtensionServiceWrapper.rb +332 -0
- data/lib/adwords_api/v201003/CampaignCriterionService.rb +1145 -0
- data/lib/adwords_api/v201003/CampaignCriterionServiceDriver.rb +63 -0
- data/lib/adwords_api/v201003/CampaignCriterionServiceMappingRegistry.rb +1344 -0
- data/lib/adwords_api/v201003/CampaignCriterionServiceWrapper.rb +332 -0
- data/lib/adwords_api/v201003/CampaignService.rb +1901 -0
- data/lib/adwords_api/v201003/CampaignServiceDriver.rb +63 -0
- data/lib/adwords_api/v201003/CampaignServiceMappingRegistry.rb +2010 -0
- data/lib/adwords_api/v201003/CampaignServiceWrapper.rb +332 -0
- data/lib/adwords_api/v201003/CampaignTargetService.rb +1642 -0
- data/lib/adwords_api/v201003/CampaignTargetServiceDriver.rb +63 -0
- data/lib/adwords_api/v201003/CampaignTargetServiceMappingRegistry.rb +1754 -0
- data/lib/adwords_api/v201003/CampaignTargetServiceWrapper.rb +332 -0
- data/lib/adwords_api/v201003/GeoLocationService.rb +692 -0
- data/lib/adwords_api/v201003/GeoLocationServiceDriver.rb +55 -0
- data/lib/adwords_api/v201003/GeoLocationServiceMappingRegistry.rb +840 -0
- data/lib/adwords_api/v201003/GeoLocationServiceWrapper.rb +303 -0
- data/lib/adwords_api/v201003/InfoService.rb +687 -0
- data/lib/adwords_api/v201003/InfoServiceDriver.rb +55 -0
- data/lib/adwords_api/v201003/InfoServiceMappingRegistry.rb +833 -0
- data/lib/adwords_api/v201003/InfoServiceWrapper.rb +303 -0
- data/lib/adwords_api/v201003/MediaService.rb +1192 -0
- data/lib/adwords_api/v201003/MediaServiceDriver.rb +63 -0
- data/lib/adwords_api/v201003/MediaServiceMappingRegistry.rb +1290 -0
- data/lib/adwords_api/v201003/MediaServiceWrapper.rb +332 -0
- data/lib/adwords_api/v201003/ReportDefinitionService.rb +905 -0
- data/lib/adwords_api/v201003/ReportDefinitionServiceDriver.rb +71 -0
- data/lib/adwords_api/v201003/ReportDefinitionServiceMappingRegistry.rb +1036 -0
- data/lib/adwords_api/v201003/ReportDefinitionServiceWrapper.rb +378 -0
- data/lib/adwords_api/v201003/TargetingIdeaService.rb +2517 -0
- data/lib/adwords_api/v201003/TargetingIdeaServiceDriver.rb +63 -0
- data/lib/adwords_api/v201003/TargetingIdeaServiceMappingRegistry.rb +2925 -0
- data/lib/adwords_api/v201003/TargetingIdeaServiceWrapper.rb +335 -0
- data/lib/adwords_api/v201008/AdExtensionOverrideService.rb +1383 -0
- data/lib/adwords_api/v201008/AdExtensionOverrideServiceDriver.rb +63 -0
- data/lib/adwords_api/v201008/AdExtensionOverrideServiceMappingRegistry.rb +1563 -0
- data/lib/adwords_api/v201008/AdExtensionOverrideServiceWrapper.rb +332 -0
- data/lib/adwords_api/v201008/AdGroupAdService.rb +2928 -0
- data/lib/adwords_api/v201008/AdGroupAdServiceDriver.rb +63 -0
- data/lib/adwords_api/v201008/AdGroupAdServiceMappingRegistry.rb +2969 -0
- data/lib/adwords_api/v201008/AdGroupAdServiceWrapper.rb +332 -0
- data/lib/adwords_api/v201008/AdGroupCriterionService.rb +1981 -0
- data/lib/adwords_api/v201008/AdGroupCriterionServiceDriver.rb +63 -0
- data/lib/adwords_api/v201008/AdGroupCriterionServiceMappingRegistry.rb +2229 -0
- data/lib/adwords_api/v201008/AdGroupCriterionServiceWrapper.rb +332 -0
- data/lib/adwords_api/v201008/AdGroupService.rb +1548 -0
- data/lib/adwords_api/v201008/AdGroupServiceDriver.rb +63 -0
- data/lib/adwords_api/v201008/AdGroupServiceMappingRegistry.rb +1687 -0
- data/lib/adwords_api/v201008/AdGroupServiceWrapper.rb +332 -0
- data/lib/adwords_api/v201008/AdParamService.rb +889 -0
- data/lib/adwords_api/v201008/AdParamServiceDriver.rb +63 -0
- data/lib/adwords_api/v201008/AdParamServiceMappingRegistry.rb +1041 -0
- data/lib/adwords_api/v201008/AdParamServiceWrapper.rb +332 -0
- data/lib/adwords_api/v201008/AlertService.rb +743 -0
- data/lib/adwords_api/v201008/AlertServiceDriver.rb +55 -0
- data/lib/adwords_api/v201008/AlertServiceMappingRegistry.rb +836 -0
- data/lib/adwords_api/v201008/AlertServiceWrapper.rb +303 -0
- data/lib/adwords_api/v201008/BidLandscapeService.rb +928 -0
- data/lib/adwords_api/v201008/BidLandscapeServiceDriver.rb +55 -0
- data/lib/adwords_api/v201008/BidLandscapeServiceMappingRegistry.rb +1059 -0
- data/lib/adwords_api/v201008/BidLandscapeServiceWrapper.rb +306 -0
- data/lib/adwords_api/v201008/BulkMutateJobService.rb +6063 -0
- data/lib/adwords_api/v201008/BulkMutateJobServiceDriver.rb +63 -0
- data/lib/adwords_api/v201008/BulkMutateJobServiceMappingRegistry.rb +6265 -0
- data/lib/adwords_api/v201008/BulkMutateJobServiceWrapper.rb +332 -0
- data/lib/adwords_api/v201008/CampaignAdExtensionService.rb +1594 -0
- data/lib/adwords_api/v201008/CampaignAdExtensionServiceDriver.rb +63 -0
- data/lib/adwords_api/v201008/CampaignAdExtensionServiceMappingRegistry.rb +1789 -0
- data/lib/adwords_api/v201008/CampaignAdExtensionServiceWrapper.rb +332 -0
- data/lib/adwords_api/v201008/CampaignCriterionService.rb +1243 -0
- data/lib/adwords_api/v201008/CampaignCriterionServiceDriver.rb +63 -0
- data/lib/adwords_api/v201008/CampaignCriterionServiceMappingRegistry.rb +1467 -0
- data/lib/adwords_api/v201008/CampaignCriterionServiceWrapper.rb +332 -0
- data/lib/adwords_api/v201008/CampaignService.rb +1979 -0
- data/lib/adwords_api/v201008/CampaignServiceDriver.rb +63 -0
- data/lib/adwords_api/v201008/CampaignServiceMappingRegistry.rb +2089 -0
- data/lib/adwords_api/v201008/CampaignServiceWrapper.rb +332 -0
- data/lib/adwords_api/v201008/CampaignTargetService.rb +1651 -0
- data/lib/adwords_api/v201008/CampaignTargetServiceDriver.rb +63 -0
- data/lib/adwords_api/v201008/CampaignTargetServiceMappingRegistry.rb +1757 -0
- data/lib/adwords_api/v201008/CampaignTargetServiceWrapper.rb +332 -0
- data/lib/adwords_api/v201008/CustomerSyncService.rb +693 -0
- data/lib/adwords_api/v201008/CustomerSyncServiceDriver.rb +55 -0
- data/lib/adwords_api/v201008/CustomerSyncServiceMappingRegistry.rb +820 -0
- data/lib/adwords_api/v201008/CustomerSyncServiceWrapper.rb +303 -0
- data/lib/adwords_api/v201008/ExperimentService.rb +1124 -0
- data/lib/adwords_api/v201008/ExperimentServiceDriver.rb +63 -0
- data/lib/adwords_api/v201008/ExperimentServiceMappingRegistry.rb +1281 -0
- data/lib/adwords_api/v201008/ExperimentServiceWrapper.rb +332 -0
- data/lib/adwords_api/v201008/GeoLocationService.rb +695 -0
- data/lib/adwords_api/v201008/GeoLocationServiceDriver.rb +55 -0
- data/lib/adwords_api/v201008/GeoLocationServiceMappingRegistry.rb +843 -0
- data/lib/adwords_api/v201008/GeoLocationServiceWrapper.rb +303 -0
- data/lib/adwords_api/v201008/InfoService.rb +690 -0
- data/lib/adwords_api/v201008/InfoServiceDriver.rb +55 -0
- data/lib/adwords_api/v201008/InfoServiceMappingRegistry.rb +836 -0
- data/lib/adwords_api/v201008/InfoServiceWrapper.rb +303 -0
- data/lib/adwords_api/v201008/MediaService.rb +1144 -0
- data/lib/adwords_api/v201008/MediaServiceDriver.rb +63 -0
- data/lib/adwords_api/v201008/MediaServiceMappingRegistry.rb +1241 -0
- data/lib/adwords_api/v201008/MediaServiceWrapper.rb +332 -0
- data/lib/adwords_api/v201008/ReportDefinitionService.rb +976 -0
- data/lib/adwords_api/v201008/ReportDefinitionServiceDriver.rb +71 -0
- data/lib/adwords_api/v201008/ReportDefinitionServiceMappingRegistry.rb +1115 -0
- data/lib/adwords_api/v201008/ReportDefinitionServiceWrapper.rb +378 -0
- data/lib/adwords_api/v201008/ServicedAccountService.rb +630 -0
- data/lib/adwords_api/v201008/ServicedAccountServiceDriver.rb +55 -0
- data/lib/adwords_api/v201008/ServicedAccountServiceMappingRegistry.rb +752 -0
- data/lib/adwords_api/v201008/ServicedAccountServiceWrapper.rb +303 -0
- data/lib/adwords_api/v201008/TargetingIdeaService.rb +2645 -0
- data/lib/adwords_api/v201008/TargetingIdeaServiceDriver.rb +63 -0
- data/lib/adwords_api/v201008/TargetingIdeaServiceMappingRegistry.rb +3080 -0
- data/lib/adwords_api/v201008/TargetingIdeaServiceWrapper.rb +335 -0
- data/lib/adwords_api/v201008/TrafficEstimatorService.rb +1833 -0
- data/lib/adwords_api/v201008/TrafficEstimatorServiceDriver.rb +55 -0
- data/lib/adwords_api/v201008/TrafficEstimatorServiceMappingRegistry.rb +2124 -0
- data/lib/adwords_api/v201008/TrafficEstimatorServiceWrapper.rb +303 -0
- data/lib/adwords_api/v201008/UserListService.rb +846 -0
- data/lib/adwords_api/v201008/UserListServiceDriver.rb +63 -0
- data/lib/adwords_api/v201008/UserListServiceMappingRegistry.rb +915 -0
- data/lib/adwords_api/v201008/UserListServiceWrapper.rb +332 -0
- data/lib/adwords_api/v201101/AdExtensionOverrideService.rb +1399 -0
- data/lib/adwords_api/v201101/AdExtensionOverrideServiceDriver.rb +63 -0
- data/lib/adwords_api/v201101/AdExtensionOverrideServiceMappingRegistry.rb +1573 -0
- data/lib/adwords_api/v201101/AdExtensionOverrideServiceWrapper.rb +332 -0
- data/lib/adwords_api/v201101/AdGroupAdService.rb +2585 -0
- data/lib/adwords_api/v201101/AdGroupAdServiceDriver.rb +63 -0
- data/lib/adwords_api/v201101/AdGroupAdServiceMappingRegistry.rb +2583 -0
- data/lib/adwords_api/v201101/AdGroupAdServiceWrapper.rb +332 -0
- data/lib/adwords_api/v201101/AdGroupCriterionService.rb +2099 -0
- data/lib/adwords_api/v201101/AdGroupCriterionServiceDriver.rb +63 -0
- data/lib/adwords_api/v201101/AdGroupCriterionServiceMappingRegistry.rb +2327 -0
- data/lib/adwords_api/v201101/AdGroupCriterionServiceWrapper.rb +332 -0
- data/lib/adwords_api/v201101/AdGroupService.rb +1610 -0
- data/lib/adwords_api/v201101/AdGroupServiceDriver.rb +63 -0
- data/lib/adwords_api/v201101/AdGroupServiceMappingRegistry.rb +1765 -0
- data/lib/adwords_api/v201101/AdGroupServiceWrapper.rb +332 -0
- data/lib/adwords_api/v201101/AdParamService.rb +922 -0
- data/lib/adwords_api/v201101/AdParamServiceDriver.rb +63 -0
- data/lib/adwords_api/v201101/AdParamServiceMappingRegistry.rb +1077 -0
- data/lib/adwords_api/v201101/AdParamServiceWrapper.rb +332 -0
- data/lib/adwords_api/v201101/AlertService.rb +747 -0
- data/lib/adwords_api/v201101/AlertServiceDriver.rb +55 -0
- data/lib/adwords_api/v201101/AlertServiceMappingRegistry.rb +838 -0
- data/lib/adwords_api/v201101/AlertServiceWrapper.rb +303 -0
- data/lib/adwords_api/v201101/BulkMutateJobService.rb +6208 -0
- data/lib/adwords_api/v201101/BulkMutateJobServiceDriver.rb +63 -0
- data/lib/adwords_api/v201101/BulkMutateJobServiceMappingRegistry.rb +6433 -0
- data/lib/adwords_api/v201101/BulkMutateJobServiceWrapper.rb +332 -0
- data/lib/adwords_api/v201101/CampaignAdExtensionService.rb +1677 -0
- data/lib/adwords_api/v201101/CampaignAdExtensionServiceDriver.rb +63 -0
- data/lib/adwords_api/v201101/CampaignAdExtensionServiceMappingRegistry.rb +1855 -0
- data/lib/adwords_api/v201101/CampaignAdExtensionServiceWrapper.rb +332 -0
- data/lib/adwords_api/v201101/CampaignCriterionService.rb +1388 -0
- data/lib/adwords_api/v201101/CampaignCriterionServiceDriver.rb +63 -0
- data/lib/adwords_api/v201101/CampaignCriterionServiceMappingRegistry.rb +1601 -0
- data/lib/adwords_api/v201101/CampaignCriterionServiceWrapper.rb +332 -0
- data/lib/adwords_api/v201101/CampaignService.rb +2188 -0
- data/lib/adwords_api/v201101/CampaignServiceDriver.rb +63 -0
- data/lib/adwords_api/v201101/CampaignServiceMappingRegistry.rb +2301 -0
- data/lib/adwords_api/v201101/CampaignServiceWrapper.rb +332 -0
- data/lib/adwords_api/v201101/CampaignTargetService.rb +1629 -0
- data/lib/adwords_api/v201101/CampaignTargetServiceDriver.rb +63 -0
- data/lib/adwords_api/v201101/CampaignTargetServiceMappingRegistry.rb +1725 -0
- data/lib/adwords_api/v201101/CampaignTargetServiceWrapper.rb +332 -0
- data/lib/adwords_api/v201101/CustomerSyncService.rb +694 -0
- data/lib/adwords_api/v201101/CustomerSyncServiceDriver.rb +55 -0
- data/lib/adwords_api/v201101/CustomerSyncServiceMappingRegistry.rb +820 -0
- data/lib/adwords_api/v201101/CustomerSyncServiceWrapper.rb +303 -0
- data/lib/adwords_api/v201101/DataService.rb +1079 -0
- data/lib/adwords_api/v201101/DataServiceDriver.rb +63 -0
- data/lib/adwords_api/v201101/DataServiceMappingRegistry.rb +1177 -0
- data/lib/adwords_api/v201101/DataServiceWrapper.rb +338 -0
- data/lib/adwords_api/v201101/ExperimentService.rb +1256 -0
- data/lib/adwords_api/v201101/ExperimentServiceDriver.rb +63 -0
- data/lib/adwords_api/v201101/ExperimentServiceMappingRegistry.rb +1417 -0
- data/lib/adwords_api/v201101/ExperimentServiceWrapper.rb +332 -0
- data/lib/adwords_api/v201101/GeoLocationService.rb +695 -0
- data/lib/adwords_api/v201101/GeoLocationServiceDriver.rb +55 -0
- data/lib/adwords_api/v201101/GeoLocationServiceMappingRegistry.rb +843 -0
- data/lib/adwords_api/v201101/GeoLocationServiceWrapper.rb +303 -0
- data/lib/adwords_api/v201101/InfoService.rb +690 -0
- data/lib/adwords_api/v201101/InfoServiceDriver.rb +55 -0
- data/lib/adwords_api/v201101/InfoServiceMappingRegistry.rb +836 -0
- data/lib/adwords_api/v201101/InfoServiceWrapper.rb +303 -0
- data/lib/adwords_api/v201101/MediaService.rb +1247 -0
- data/lib/adwords_api/v201101/MediaServiceDriver.rb +63 -0
- data/lib/adwords_api/v201101/MediaServiceMappingRegistry.rb +1357 -0
- data/lib/adwords_api/v201101/MediaServiceWrapper.rb +332 -0
- data/lib/adwords_api/v201101/ReportDefinitionService.rb +1121 -0
- data/lib/adwords_api/v201101/ReportDefinitionServiceDriver.rb +71 -0
- data/lib/adwords_api/v201101/ReportDefinitionServiceMappingRegistry.rb +1263 -0
- data/lib/adwords_api/v201101/ReportDefinitionServiceWrapper.rb +364 -0
- data/lib/adwords_api/v201101/ServicedAccountService.rb +636 -0
- data/lib/adwords_api/v201101/ServicedAccountServiceDriver.rb +55 -0
- data/lib/adwords_api/v201101/ServicedAccountServiceMappingRegistry.rb +756 -0
- data/lib/adwords_api/v201101/ServicedAccountServiceWrapper.rb +303 -0
- data/lib/adwords_api/v201101/TargetingIdeaService.rb +2827 -0
- data/lib/adwords_api/v201101/TargetingIdeaServiceDriver.rb +63 -0
- data/lib/adwords_api/v201101/TargetingIdeaServiceMappingRegistry.rb +3262 -0
- data/lib/adwords_api/v201101/TargetingIdeaServiceWrapper.rb +335 -0
- data/lib/adwords_api/v201101/TrafficEstimatorService.rb +1839 -0
- data/lib/adwords_api/v201101/TrafficEstimatorServiceDriver.rb +55 -0
- data/lib/adwords_api/v201101/TrafficEstimatorServiceMappingRegistry.rb +2128 -0
- data/lib/adwords_api/v201101/TrafficEstimatorServiceWrapper.rb +303 -0
- data/lib/adwords_api/v201101/UserListService.rb +1206 -0
- data/lib/adwords_api/v201101/UserListServiceDriver.rb +63 -0
- data/lib/adwords_api/v201101/UserListServiceMappingRegistry.rb +1323 -0
- data/lib/adwords_api/v201101/UserListServiceWrapper.rb +332 -0
- metadata +649 -0
@@ -0,0 +1,245 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
#
|
3
|
+
# Author:: api.sgomes@gmail.com (Sérgio Gomes)
|
4
|
+
#
|
5
|
+
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
6
|
+
#
|
7
|
+
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
16
|
+
# implied.
|
17
|
+
# See the License for the specific language governing permissions and
|
18
|
+
# limitations under the License.
|
19
|
+
#
|
20
|
+
# Contains extensions to the API, that is, service helper methods provided in
|
21
|
+
# client-side by the client library.
|
22
|
+
|
23
|
+
require 'rexml/document'
|
24
|
+
require 'csv'
|
25
|
+
require 'ads_common/http'
|
26
|
+
require 'json'
|
27
|
+
|
28
|
+
module AdwordsApi
|
29
|
+
|
30
|
+
module Extensions
|
31
|
+
|
32
|
+
# Maintains a list of all extension methods, indexed by version and service.
|
33
|
+
# Using camelCase to match API method names.
|
34
|
+
@@extensions = {
|
35
|
+
[:v13, :ReportService] => [:download_xml_report, :download_csv_report],
|
36
|
+
[:v201003, :ReportDefinitionService] => [:download_report,
|
37
|
+
:download_report_as_file],
|
38
|
+
[:v201008, :ReportDefinitionService] => [:download_report,
|
39
|
+
:download_report_as_file],
|
40
|
+
[:v201101, :ReportDefinitionService] => [:download_report,
|
41
|
+
:download_report_as_file, :download_mcc_report]
|
42
|
+
}
|
43
|
+
|
44
|
+
# Defines the parameter list for every extension method
|
45
|
+
@@methods = {
|
46
|
+
:download_xml_report => [:job_id],
|
47
|
+
:download_csv_report => [:job_id],
|
48
|
+
:download_report => [:report_definition_id],
|
49
|
+
:download_report_as_file => [:report_definition_id, :path]
|
50
|
+
}
|
51
|
+
|
52
|
+
# Return list of all extension methods, indexed by version and service.
|
53
|
+
def self.extensions
|
54
|
+
return @@extensions
|
55
|
+
end
|
56
|
+
|
57
|
+
# Return the parameter list for every extension method.
|
58
|
+
def self.methods
|
59
|
+
return @@methods
|
60
|
+
end
|
61
|
+
|
62
|
+
#########################################################################
|
63
|
+
# NOTE: The following extension methods shouldn't be used directly; they
|
64
|
+
# should instead be used from the services wrappers they get mapped to.
|
65
|
+
# For example, you should use ReportServiceWrapper::downloadXmlReport
|
66
|
+
# instead of Extensions::downloadXmlReport.
|
67
|
+
#########################################################################
|
68
|
+
|
69
|
+
# <i>Extension method</i> -- Download and return report data in XML format.
|
70
|
+
#
|
71
|
+
# *Warning*: this method is blocking for the calling thread.
|
72
|
+
#
|
73
|
+
# Args:
|
74
|
+
# - wrapper: the service wrapper object for any API methods that need to be
|
75
|
+
# called
|
76
|
+
# - job_id: the job id for the report to be downloaded
|
77
|
+
#
|
78
|
+
# Returns:
|
79
|
+
# The xml for the report (as a string)
|
80
|
+
#
|
81
|
+
def self.download_xml_report(wrapper, job_id)
|
82
|
+
sleep_interval = 30
|
83
|
+
|
84
|
+
status_field = nil
|
85
|
+
download_field = nil
|
86
|
+
|
87
|
+
if wrapper.api.config.read('service.use_ruby_names')
|
88
|
+
status_field = :get_report_job_status_return
|
89
|
+
download_field = :get_report_download_url_return
|
90
|
+
else
|
91
|
+
status_field = :getReportJobStatusReturn
|
92
|
+
download_field = :getReportDownloadUrlReturn
|
93
|
+
end
|
94
|
+
|
95
|
+
# Repeatedly check the report status until it is finished.
|
96
|
+
# 'Pending' and 'InProgress' statuses indicate the job is still being run.
|
97
|
+
status = wrapper.get_report_job_status(job_id)[status_field]
|
98
|
+
while status != 'Completed' && status != 'Failed'
|
99
|
+
sleep(sleep_interval)
|
100
|
+
status = wrapper.get_report_job_status(job_id)[status_field]
|
101
|
+
end
|
102
|
+
|
103
|
+
if status == 'Completed'
|
104
|
+
report_url = wrapper.get_report_download_url(job_id)[download_field]
|
105
|
+
|
106
|
+
# Download the report and return its contents. The report is an XML
|
107
|
+
# document; the actual element names vary depending on the type of
|
108
|
+
# report run and columns requested.
|
109
|
+
begin
|
110
|
+
return AdsCommon::Http.get(report_url, wrapper.api.config)
|
111
|
+
rescue Errno::ECONNRESET, SOAP::HTTPStreamError, SocketError => e
|
112
|
+
# This exception indicates a connection-level error.
|
113
|
+
# In general, it is likely to be transitory.
|
114
|
+
[e, e.backtrace.first]
|
115
|
+
end
|
116
|
+
else
|
117
|
+
# Reports that pass validation will normally not fail, but if there is
|
118
|
+
# an error in the report generation service it can sometimes happen.
|
119
|
+
raise AdwordsApi::Error::Error, 'Report generation failed.'
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
# <i>Extension method</i> -- Download and return report data in CSV format.
|
124
|
+
#
|
125
|
+
# *Warning*: this method is blocking for the calling thread.
|
126
|
+
#
|
127
|
+
# Args:
|
128
|
+
# - wrapper: the service wrapper object for any API methods that need to be
|
129
|
+
# called
|
130
|
+
# - job_id: the job id for the report to be downloaded
|
131
|
+
# - xml: optional parameter used for testing and debugging
|
132
|
+
#
|
133
|
+
# Returns:
|
134
|
+
# The CSV data for the report (as a string)
|
135
|
+
#
|
136
|
+
def self.download_csv_report(wrapper, job_id, report_xml=nil)
|
137
|
+
# Get XML report data.
|
138
|
+
report_xml = download_xml_report(wrapper, job_id) if report_xml.nil?
|
139
|
+
|
140
|
+
begin
|
141
|
+
# Construct DOM object.
|
142
|
+
doc = REXML::Document.new(report_xml)
|
143
|
+
|
144
|
+
# Get data columns.
|
145
|
+
columns = []
|
146
|
+
doc.elements.each('report/table/columns/column') do |column_elem|
|
147
|
+
name = column_elem.attributes['name']
|
148
|
+
columns << name unless name.nil?
|
149
|
+
end
|
150
|
+
|
151
|
+
# Get data rows.
|
152
|
+
rows = []
|
153
|
+
doc.elements.each('report/table/rows/row') do |row_elem|
|
154
|
+
rows << row_elem.attributes unless row_elem.attributes.nil?
|
155
|
+
end
|
156
|
+
|
157
|
+
# Build CSV
|
158
|
+
csv = ''
|
159
|
+
CSV::Writer.generate(csv) do |writer|
|
160
|
+
writer << columns
|
161
|
+
rows.each do |row|
|
162
|
+
row_values = []
|
163
|
+
columns.each { |column| row_values << row[column] }
|
164
|
+
writer << row_values
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
168
|
+
return csv
|
169
|
+
rescue REXML::ParseException => e
|
170
|
+
# Error parsing XML
|
171
|
+
raise AdwordsApi::Error::Error,
|
172
|
+
"Error parsing report XML: %s\nSource: %s" % [e, e.backtrace.first]
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
# <i>Extension method</i> -- Download and return a v20xx report into a file.
|
177
|
+
#
|
178
|
+
# *Warning*: this method is blocking for the calling thread.
|
179
|
+
#
|
180
|
+
# Args:
|
181
|
+
# - wrapper: the service wrapper object for any API methods that need to be
|
182
|
+
# called
|
183
|
+
# - report_definition_id: the id for the report definition
|
184
|
+
# - path: the file where the data should be saved
|
185
|
+
#
|
186
|
+
# Returns:
|
187
|
+
# nil
|
188
|
+
#
|
189
|
+
def self.download_report_as_file(wrapper, report_definition_id, path)
|
190
|
+
report_data = download_report(wrapper, report_definition_id)
|
191
|
+
|
192
|
+
# Write to file (if provided)
|
193
|
+
if path
|
194
|
+
open(path, 'w') { |file| file.puts(report_data) }
|
195
|
+
end
|
196
|
+
|
197
|
+
return nil
|
198
|
+
end
|
199
|
+
|
200
|
+
# <i>Extension method</i> -- Download and return a v20xx report.
|
201
|
+
#
|
202
|
+
# *Warning*: this method is blocking for the calling thread.
|
203
|
+
#
|
204
|
+
# Args:
|
205
|
+
# - wrapper: the service wrapper object for any API methods that need to be
|
206
|
+
# called
|
207
|
+
# - report_definition_id: the id for the report definition
|
208
|
+
#
|
209
|
+
# Returns:
|
210
|
+
# The data for the report (as a string)
|
211
|
+
#
|
212
|
+
def self.download_report(wrapper, report_definition_id)
|
213
|
+
report_response = get_report_response(wrapper, "?__rd=%s" %
|
214
|
+
report_definition_id)
|
215
|
+
return report_response.body
|
216
|
+
end
|
217
|
+
|
218
|
+
private
|
219
|
+
|
220
|
+
# Gets a report response for a given parameters.
|
221
|
+
def self.get_report_response(wrapper, parameters)
|
222
|
+
# Get download URL.
|
223
|
+
url = AdwordsApi::ApiConfig.report_download_url(
|
224
|
+
wrapper.api.config.read('service.environment'),
|
225
|
+
wrapper.version)
|
226
|
+
|
227
|
+
# Set HTTP headers.
|
228
|
+
headers = {}
|
229
|
+
credentials = wrapper.api.credential_handler.credentials
|
230
|
+
auth_handler = wrapper.api.client_login_handler
|
231
|
+
headers['Authorization'] = "GoogleLogin auth=%s" %
|
232
|
+
auth_handler.headers(credentials)[:authToken]
|
233
|
+
if credentials[:clientEmail]
|
234
|
+
headers['clientEmail'] = credentials[:clientEmail]
|
235
|
+
elsif credentials[:clientCustomerId]
|
236
|
+
headers['clientCustomerId'] = credentials[:clientCustomerId]
|
237
|
+
end
|
238
|
+
|
239
|
+
# Download report data.
|
240
|
+
report_response = AdsCommon::Http.get_response(url + parameters,
|
241
|
+
wrapper.api.config, headers)
|
242
|
+
return report_response
|
243
|
+
end
|
244
|
+
end
|
245
|
+
end
|
@@ -0,0 +1,121 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
#
|
3
|
+
# Authors:: api.sgomes@gmail.com (Sérgio Gomes)
|
4
|
+
#
|
5
|
+
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
6
|
+
#
|
7
|
+
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
16
|
+
# implied.
|
17
|
+
# See the License for the specific language governing permissions and
|
18
|
+
# limitations under the License.
|
19
|
+
#
|
20
|
+
# Handles callbacks for the AdWords API, so that it's possible to log unit
|
21
|
+
# consumption and operations performed.
|
22
|
+
|
23
|
+
require 'ads_common/soap4r_response_handler'
|
24
|
+
require 'uri'
|
25
|
+
|
26
|
+
module AdwordsApi
|
27
|
+
|
28
|
+
# Handler class to process response messages for API unit usage and statistics
|
29
|
+
# information.
|
30
|
+
class Soap4rResponseHandler < AdsCommon::Soap4rResponseHandler
|
31
|
+
|
32
|
+
# Handles the callback method.
|
33
|
+
# Logs the request data and tracks unit usage.
|
34
|
+
#
|
35
|
+
# Args:
|
36
|
+
# - method_name: name for the operation that was invoked
|
37
|
+
# - endpoint: the enodpoint URL the request was sent to
|
38
|
+
# - envelope: the envelope for the SOAP response that was received
|
39
|
+
# - params: the parameters that were passed to the method
|
40
|
+
# - fault: whether the request resulted in a fault or not
|
41
|
+
# - fault_msg: the fault message in case of a fault (nil if none)
|
42
|
+
#
|
43
|
+
def on_callback(method_name, endpoint, envelope, params, fault = false,
|
44
|
+
fault_msg = nil)
|
45
|
+
units = nil
|
46
|
+
operations = nil
|
47
|
+
response_time = nil
|
48
|
+
request_id = nil
|
49
|
+
operators = nil
|
50
|
+
operator_count = nil
|
51
|
+
|
52
|
+
# Create a hash with the count per operator used in the request
|
53
|
+
if params and params[0] and params[0].class.to_s =~ /.*::Mutate/
|
54
|
+
if params[0].is_a?(Array) and params[0].size >= 1
|
55
|
+
operators = Hash.new(0)
|
56
|
+
params[0].each do |operation|
|
57
|
+
if operation.is_a? Hash and operation[:operator]
|
58
|
+
operators[operation[:operator].to_s] += 1
|
59
|
+
elsif operation.is_a? Hash and operation['operator']
|
60
|
+
operators[operation['operator'].to_s] += 1
|
61
|
+
elsif operation.respond_to? 'operator'
|
62
|
+
operators[operation.operator.to_s] += 1
|
63
|
+
else
|
64
|
+
operators['?'] += 1
|
65
|
+
end
|
66
|
+
end
|
67
|
+
else
|
68
|
+
if params[0].is_a? Hash and params[0][:operator]
|
69
|
+
operators[params[0][:operator].to_s] += 1
|
70
|
+
elsif params[0].is_a? Hash and params[0]['operator']
|
71
|
+
operators[params[0]['operator'].to_s] += 1
|
72
|
+
elsif params[0].respond_to? 'operator'
|
73
|
+
operators[params[0].operator.to_s] += 1
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
if operators
|
79
|
+
operator_count = operators.map { |op, num| "#{op}: #{num}" }.join(', ')
|
80
|
+
end
|
81
|
+
|
82
|
+
header = envelope.header if envelope
|
83
|
+
if header and header.key?('ResponseHeader')
|
84
|
+
header = header['ResponseHeader'].element
|
85
|
+
end
|
86
|
+
|
87
|
+
if header
|
88
|
+
@parent.mutex.synchronize do
|
89
|
+
units = parse_header(header['units'])
|
90
|
+
unless units.nil?
|
91
|
+
@parent.last_units = units.to_i
|
92
|
+
@parent.total_units = @parent.total_units + units.to_i
|
93
|
+
end
|
94
|
+
|
95
|
+
operations = parse_header(header['operations'])
|
96
|
+
response_time = parse_header(header['responseTime'])
|
97
|
+
request_id = parse_header(header['requestId'])
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
host = URI.parse(endpoint).host
|
102
|
+
|
103
|
+
data = "host=#{host} method=#{method_name} " +
|
104
|
+
"responseTime=#{response_time} operations=#{operations} "
|
105
|
+
|
106
|
+
data += "operators={#{operator_count}} " if operator_count
|
107
|
+
|
108
|
+
data += "units=#{units} requestId=#{request_id} "
|
109
|
+
|
110
|
+
data += "isFault=#{(!!fault).to_s} "
|
111
|
+
|
112
|
+
if fault_msg
|
113
|
+
data += "faultMessage=\"#{fault_msg}\""
|
114
|
+
else
|
115
|
+
data += "faultMessage=none"
|
116
|
+
end
|
117
|
+
|
118
|
+
@parent.request_logger << data
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
@@ -0,0 +1,80 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
#
|
3
|
+
# Author:: sgomes@google.com (Sérgio Gomes)
|
4
|
+
#
|
5
|
+
# Copyright:: Copyright 2011, Google Inc. All Rights Reserved.
|
6
|
+
#
|
7
|
+
# License:: Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
16
|
+
# implied.
|
17
|
+
# See the License for the specific language governing permissions and
|
18
|
+
# limitations under the License.
|
19
|
+
#
|
20
|
+
# Contains global utility methods.
|
21
|
+
|
22
|
+
module AdwordsApi
|
23
|
+
module Utils
|
24
|
+
|
25
|
+
public
|
26
|
+
|
27
|
+
# Gets a map from an array of map entries. A map entry is any object that
|
28
|
+
# has a key and value field.
|
29
|
+
#
|
30
|
+
# Args:
|
31
|
+
# - entries: list of map entries
|
32
|
+
#
|
33
|
+
# Returns:
|
34
|
+
# - hash constructed from map entries
|
35
|
+
#
|
36
|
+
def self.map(entries)
|
37
|
+
map = {}
|
38
|
+
entries.each do |entry|
|
39
|
+
map[entry[:key]] = entry[:value]
|
40
|
+
end
|
41
|
+
return map
|
42
|
+
end
|
43
|
+
|
44
|
+
# Returns the source operation index for an error
|
45
|
+
#
|
46
|
+
# Args:
|
47
|
+
# - error: the error to be analyzed
|
48
|
+
#
|
49
|
+
# Returns:
|
50
|
+
# - index for the source operation, nil if none
|
51
|
+
#
|
52
|
+
def self.operation_index_for_error(error)
|
53
|
+
if error and error[:field_path]
|
54
|
+
parts = error[:field_path].split('.')
|
55
|
+
if parts.length > 0
|
56
|
+
match = parts.first.match(/operations\[(\d)\]/)
|
57
|
+
return match ? match[1].to_i : nil
|
58
|
+
end
|
59
|
+
end
|
60
|
+
return nil
|
61
|
+
end
|
62
|
+
|
63
|
+
# Auxiliary method to format an ID to the pattern ###-###-####.
|
64
|
+
#
|
65
|
+
# Args:
|
66
|
+
# - id: ID in unformatted form
|
67
|
+
#
|
68
|
+
# Returns:
|
69
|
+
# - string containing the formatted ID
|
70
|
+
#
|
71
|
+
def self.format_id(id)
|
72
|
+
str_id = id.to_s.gsub(/\D/, '')
|
73
|
+
if str_id.size >= 7
|
74
|
+
str_array = str_id.scan(/(\d{3})(\d{3})(\d+)/)
|
75
|
+
str_id = str_array.join('-') unless str_array.empty?
|
76
|
+
end
|
77
|
+
return str_id
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
@@ -0,0 +1,321 @@
|
|
1
|
+
require 'xsd/qname'
|
2
|
+
|
3
|
+
module AdwordsApi; module V13; module AccountService
|
4
|
+
|
5
|
+
|
6
|
+
# AccountInfo
|
7
|
+
# - billingAddress - AdwordsApi::V13::AccountService::Address
|
8
|
+
# - currencyCode - SOAP::SOAPString
|
9
|
+
# - customerId - SOAP::SOAPLong
|
10
|
+
# - defaultNetworkTargeting - AdwordsApi::V13::AccountService::NetworkTarget
|
11
|
+
# - descriptiveName - SOAP::SOAPString
|
12
|
+
# - emailPromotionsPreferences - AdwordsApi::V13::AccountService::EmailPromotionsPreferences
|
13
|
+
# - languagePreference - SOAP::SOAPString
|
14
|
+
# - primaryAddress - AdwordsApi::V13::AccountService::Address
|
15
|
+
# - primaryBusinessCategory - SOAP::SOAPString
|
16
|
+
# - timeZoneEffectiveDate - SOAP::SOAPLong
|
17
|
+
# - timeZoneId - SOAP::SOAPString
|
18
|
+
class AccountInfo
|
19
|
+
attr_accessor :billingAddress
|
20
|
+
attr_accessor :currencyCode
|
21
|
+
attr_accessor :customerId
|
22
|
+
attr_accessor :defaultNetworkTargeting
|
23
|
+
attr_accessor :descriptiveName
|
24
|
+
attr_accessor :emailPromotionsPreferences
|
25
|
+
attr_accessor :languagePreference
|
26
|
+
attr_accessor :primaryAddress
|
27
|
+
attr_accessor :primaryBusinessCategory
|
28
|
+
attr_accessor :timeZoneEffectiveDate
|
29
|
+
attr_accessor :timeZoneId
|
30
|
+
|
31
|
+
def initialize(billingAddress = nil, currencyCode = nil, customerId = nil, defaultNetworkTargeting = nil, descriptiveName = nil, emailPromotionsPreferences = nil, languagePreference = nil, primaryAddress = nil, primaryBusinessCategory = nil, timeZoneEffectiveDate = nil, timeZoneId = nil)
|
32
|
+
@billingAddress = billingAddress
|
33
|
+
@currencyCode = currencyCode
|
34
|
+
@customerId = customerId
|
35
|
+
@defaultNetworkTargeting = defaultNetworkTargeting
|
36
|
+
@descriptiveName = descriptiveName
|
37
|
+
@emailPromotionsPreferences = emailPromotionsPreferences
|
38
|
+
@languagePreference = languagePreference
|
39
|
+
@primaryAddress = primaryAddress
|
40
|
+
@primaryBusinessCategory = primaryBusinessCategory
|
41
|
+
@timeZoneEffectiveDate = timeZoneEffectiveDate
|
42
|
+
@timeZoneId = timeZoneId
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# Address
|
47
|
+
# - addressLine1 - SOAP::SOAPString
|
48
|
+
# - addressLine2 - SOAP::SOAPString
|
49
|
+
# - city - SOAP::SOAPString
|
50
|
+
# - companyName - SOAP::SOAPString
|
51
|
+
# - countryCode - SOAP::SOAPString
|
52
|
+
# - emailAddress - SOAP::SOAPString
|
53
|
+
# - faxNumber - SOAP::SOAPString
|
54
|
+
# - name - SOAP::SOAPString
|
55
|
+
# - phoneNumber - SOAP::SOAPString
|
56
|
+
# - postalCode - SOAP::SOAPString
|
57
|
+
# - state - SOAP::SOAPString
|
58
|
+
class Address
|
59
|
+
attr_accessor :addressLine1
|
60
|
+
attr_accessor :addressLine2
|
61
|
+
attr_accessor :city
|
62
|
+
attr_accessor :companyName
|
63
|
+
attr_accessor :countryCode
|
64
|
+
attr_accessor :emailAddress
|
65
|
+
attr_accessor :faxNumber
|
66
|
+
attr_accessor :name
|
67
|
+
attr_accessor :phoneNumber
|
68
|
+
attr_accessor :postalCode
|
69
|
+
attr_accessor :state
|
70
|
+
|
71
|
+
def initialize(addressLine1 = nil, addressLine2 = nil, city = nil, companyName = nil, countryCode = nil, emailAddress = nil, faxNumber = nil, name = nil, phoneNumber = nil, postalCode = nil, state = nil)
|
72
|
+
@addressLine1 = addressLine1
|
73
|
+
@addressLine2 = addressLine2
|
74
|
+
@city = city
|
75
|
+
@companyName = companyName
|
76
|
+
@countryCode = countryCode
|
77
|
+
@emailAddress = emailAddress
|
78
|
+
@faxNumber = faxNumber
|
79
|
+
@name = name
|
80
|
+
@phoneNumber = phoneNumber
|
81
|
+
@postalCode = postalCode
|
82
|
+
@state = state
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
# ApiError
|
87
|
+
# - code - SOAP::SOAPInt
|
88
|
+
# - detail - SOAP::SOAPString
|
89
|
+
# - field - SOAP::SOAPString
|
90
|
+
# - index - SOAP::SOAPInt
|
91
|
+
# - isExemptable - SOAP::SOAPBoolean
|
92
|
+
# - textIndex - SOAP::SOAPInt
|
93
|
+
# - textLength - SOAP::SOAPInt
|
94
|
+
# - trigger - SOAP::SOAPString
|
95
|
+
class ApiError
|
96
|
+
attr_accessor :code
|
97
|
+
attr_accessor :detail
|
98
|
+
attr_accessor :field
|
99
|
+
attr_accessor :index
|
100
|
+
attr_accessor :isExemptable
|
101
|
+
attr_accessor :textIndex
|
102
|
+
attr_accessor :textLength
|
103
|
+
attr_accessor :trigger
|
104
|
+
|
105
|
+
def initialize(code = nil, detail = nil, field = nil, index = nil, isExemptable = nil, textIndex = nil, textLength = nil, trigger = nil)
|
106
|
+
@code = code
|
107
|
+
@detail = detail
|
108
|
+
@field = field
|
109
|
+
@index = index
|
110
|
+
@isExemptable = isExemptable
|
111
|
+
@textIndex = textIndex
|
112
|
+
@textLength = textLength
|
113
|
+
@trigger = trigger
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
# ApiException
|
118
|
+
# - code - SOAP::SOAPInt
|
119
|
+
# - errors - AdwordsApi::V13::AccountService::ApiError
|
120
|
+
# - internal - SOAP::SOAPBoolean
|
121
|
+
# - message - SOAP::SOAPString
|
122
|
+
# - trigger - SOAP::SOAPString
|
123
|
+
class ApiException
|
124
|
+
attr_accessor :code
|
125
|
+
attr_accessor :errors
|
126
|
+
attr_accessor :internal
|
127
|
+
attr_accessor :message
|
128
|
+
attr_accessor :trigger
|
129
|
+
|
130
|
+
def initialize(code = nil, errors = [], internal = nil, message = nil, trigger = nil)
|
131
|
+
@code = code
|
132
|
+
@errors = errors
|
133
|
+
@internal = internal
|
134
|
+
@message = message
|
135
|
+
@trigger = trigger
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
# ClientAccountInfo
|
140
|
+
# - emailAddress - SOAP::SOAPString
|
141
|
+
# - isCustomerManager - SOAP::SOAPBoolean
|
142
|
+
class ClientAccountInfo
|
143
|
+
attr_accessor :emailAddress
|
144
|
+
attr_accessor :isCustomerManager
|
145
|
+
|
146
|
+
def initialize(emailAddress = nil, isCustomerManager = nil)
|
147
|
+
@emailAddress = emailAddress
|
148
|
+
@isCustomerManager = isCustomerManager
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
# EmailPromotionsPreferences
|
153
|
+
# - accountPerformanceEnabled - SOAP::SOAPBoolean
|
154
|
+
# - disapprovedAdsEnabled - SOAP::SOAPBoolean
|
155
|
+
# - marketResearchEnabled - SOAP::SOAPBoolean
|
156
|
+
# - newsletterEnabled - SOAP::SOAPBoolean
|
157
|
+
# - promotionsEnabled - SOAP::SOAPBoolean
|
158
|
+
class EmailPromotionsPreferences
|
159
|
+
attr_accessor :accountPerformanceEnabled
|
160
|
+
attr_accessor :disapprovedAdsEnabled
|
161
|
+
attr_accessor :marketResearchEnabled
|
162
|
+
attr_accessor :newsletterEnabled
|
163
|
+
attr_accessor :promotionsEnabled
|
164
|
+
|
165
|
+
def initialize(accountPerformanceEnabled = nil, disapprovedAdsEnabled = nil, marketResearchEnabled = nil, newsletterEnabled = nil, promotionsEnabled = nil)
|
166
|
+
@accountPerformanceEnabled = accountPerformanceEnabled
|
167
|
+
@disapprovedAdsEnabled = disapprovedAdsEnabled
|
168
|
+
@marketResearchEnabled = marketResearchEnabled
|
169
|
+
@newsletterEnabled = newsletterEnabled
|
170
|
+
@promotionsEnabled = promotionsEnabled
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
174
|
+
# MccAlert
|
175
|
+
# - clientCompanyName - SOAP::SOAPString
|
176
|
+
# - clientCustomerId - SOAP::SOAPLong
|
177
|
+
# - clientLogin - SOAP::SOAPString
|
178
|
+
# - clientName - SOAP::SOAPString
|
179
|
+
# - priority - AdwordsApi::V13::AccountService::MccAlertPriority
|
180
|
+
# - triggerTime - SOAP::SOAPDateTime
|
181
|
+
# - type - AdwordsApi::V13::AccountService::MccAlertType
|
182
|
+
class MccAlert
|
183
|
+
attr_accessor :clientCompanyName
|
184
|
+
attr_accessor :clientCustomerId
|
185
|
+
attr_accessor :clientLogin
|
186
|
+
attr_accessor :clientName
|
187
|
+
attr_accessor :priority
|
188
|
+
attr_accessor :triggerTime
|
189
|
+
attr_accessor :type
|
190
|
+
|
191
|
+
def initialize(clientCompanyName = nil, clientCustomerId = nil, clientLogin = nil, clientName = nil, priority = nil, triggerTime = nil, type = nil)
|
192
|
+
@clientCompanyName = clientCompanyName
|
193
|
+
@clientCustomerId = clientCustomerId
|
194
|
+
@clientLogin = clientLogin
|
195
|
+
@clientName = clientName
|
196
|
+
@priority = priority
|
197
|
+
@triggerTime = triggerTime
|
198
|
+
@type = type
|
199
|
+
end
|
200
|
+
end
|
201
|
+
|
202
|
+
# NetworkTarget
|
203
|
+
# - networkTypes - AdwordsApi::V13::AccountService::NetworkType
|
204
|
+
class NetworkTarget
|
205
|
+
attr_accessor :networkTypes
|
206
|
+
|
207
|
+
def initialize(networkTypes = [])
|
208
|
+
@networkTypes = networkTypes
|
209
|
+
end
|
210
|
+
end
|
211
|
+
|
212
|
+
# MccAlertPriority
|
213
|
+
class MccAlertPriority < ::String
|
214
|
+
High = MccAlertPriority.new("High")
|
215
|
+
Low = MccAlertPriority.new("Low")
|
216
|
+
end
|
217
|
+
|
218
|
+
# MccAlertType
|
219
|
+
class MccAlertType < ::String
|
220
|
+
AccountBudgetBurnRate = MccAlertType.new("AccountBudgetBurnRate")
|
221
|
+
AccountBudgetEnding = MccAlertType.new("AccountBudgetEnding")
|
222
|
+
AccountOnTarget = MccAlertType.new("AccountOnTarget")
|
223
|
+
CampaignEnded = MccAlertType.new("CampaignEnded")
|
224
|
+
CampaignEnding = MccAlertType.new("CampaignEnding")
|
225
|
+
CreativeDisapproved = MccAlertType.new("CreativeDisapproved")
|
226
|
+
CreditCardExpiring = MccAlertType.new("CreditCardExpiring")
|
227
|
+
DeclinedPayment = MccAlertType.new("DeclinedPayment")
|
228
|
+
KeywordBelowMinCpc = MccAlertType.new("KeywordBelowMinCpc")
|
229
|
+
MissingBankReferenceNumber = MccAlertType.new("MissingBankReferenceNumber")
|
230
|
+
PaymentNotEntered = MccAlertType.new("PaymentNotEntered")
|
231
|
+
end
|
232
|
+
|
233
|
+
# NetworkType
|
234
|
+
class NetworkType < ::String
|
235
|
+
ContentNetwork = NetworkType.new("ContentNetwork")
|
236
|
+
GoogleSearch = NetworkType.new("GoogleSearch")
|
237
|
+
SearchNetwork = NetworkType.new("SearchNetwork")
|
238
|
+
end
|
239
|
+
|
240
|
+
# getAccountInfo
|
241
|
+
class GetAccountInfo #:nodoc: all
|
242
|
+
def initialize
|
243
|
+
end
|
244
|
+
end
|
245
|
+
|
246
|
+
# getAccountInfoResponse
|
247
|
+
# - getAccountInfoReturn - AdwordsApi::V13::AccountService::AccountInfo
|
248
|
+
class GetAccountInfoResponse #:nodoc: all
|
249
|
+
attr_accessor :getAccountInfoReturn
|
250
|
+
|
251
|
+
def initialize(getAccountInfoReturn = nil)
|
252
|
+
@getAccountInfoReturn = getAccountInfoReturn
|
253
|
+
end
|
254
|
+
end
|
255
|
+
|
256
|
+
# getClientAccountInfos
|
257
|
+
class GetClientAccountInfos #:nodoc: all
|
258
|
+
def initialize
|
259
|
+
end
|
260
|
+
end
|
261
|
+
|
262
|
+
# getClientAccountInfosResponse
|
263
|
+
# - getClientAccountInfosReturn - AdwordsApi::V13::AccountService::ClientAccountInfo
|
264
|
+
class GetClientAccountInfosResponse #:nodoc: all
|
265
|
+
attr_accessor :getClientAccountInfosReturn
|
266
|
+
|
267
|
+
def initialize(getClientAccountInfosReturn = [])
|
268
|
+
@getClientAccountInfosReturn = getClientAccountInfosReturn
|
269
|
+
end
|
270
|
+
end
|
271
|
+
|
272
|
+
# getClientAccounts
|
273
|
+
class GetClientAccounts #:nodoc: all
|
274
|
+
def initialize
|
275
|
+
end
|
276
|
+
end
|
277
|
+
|
278
|
+
# getClientAccountsResponse
|
279
|
+
# - getClientAccountsReturn - SOAP::SOAPString
|
280
|
+
class GetClientAccountsResponse #:nodoc: all
|
281
|
+
attr_accessor :getClientAccountsReturn
|
282
|
+
|
283
|
+
def initialize(getClientAccountsReturn = [])
|
284
|
+
@getClientAccountsReturn = getClientAccountsReturn
|
285
|
+
end
|
286
|
+
end
|
287
|
+
|
288
|
+
# getMccAlerts
|
289
|
+
class GetMccAlerts #:nodoc: all
|
290
|
+
def initialize
|
291
|
+
end
|
292
|
+
end
|
293
|
+
|
294
|
+
# getMccAlertsResponse
|
295
|
+
# - getMccAlertsReturn - AdwordsApi::V13::AccountService::MccAlert
|
296
|
+
class GetMccAlertsResponse #:nodoc: all
|
297
|
+
attr_accessor :getMccAlertsReturn
|
298
|
+
|
299
|
+
def initialize(getMccAlertsReturn = [])
|
300
|
+
@getMccAlertsReturn = getMccAlertsReturn
|
301
|
+
end
|
302
|
+
end
|
303
|
+
|
304
|
+
# updateAccountInfo
|
305
|
+
# - accountInfo - AdwordsApi::V13::AccountService::AccountInfo
|
306
|
+
class UpdateAccountInfo #:nodoc: all
|
307
|
+
attr_accessor :accountInfo
|
308
|
+
|
309
|
+
def initialize(accountInfo = nil)
|
310
|
+
@accountInfo = accountInfo
|
311
|
+
end
|
312
|
+
end
|
313
|
+
|
314
|
+
# updateAccountInfoResponse
|
315
|
+
class UpdateAccountInfoResponse #:nodoc: all
|
316
|
+
def initialize
|
317
|
+
end
|
318
|
+
end
|
319
|
+
|
320
|
+
|
321
|
+
end; end; end
|