Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
39.0.0
-----
- Compatibility with v23.2 of the API: https://developers.google.com/google-ads/api/docs/release-notes
- Renamed 'gaada' to 'ads_assistant' for metadata headers.


38.1.0
-----
- Added more detailed metadata headers.
Expand Down
6 changes: 6 additions & 0 deletions codegen/factories.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ module Resources
end
module Services
end
module Actions
end
end)

potential_resources = []
Expand Down Expand Up @@ -59,6 +61,10 @@ module Services
Dir["#{GEM_ROOT}/lib/google/ads/google_ads/#{version.to_s.downcase}/errors/*.rb"].each do |fn|
require fn.gsub("#{GEM_ROOT}/lib/", "")
end

Dir["#{GEM_ROOT}/lib/google/ads/google_ads/#{version.to_s.downcase}/actions/*.rb"].each do |fn|
require fn.gsub("#{GEM_ROOT}/lib/", "")
end
end

resources = filter_resources_for_google_ads(version, potential_resources)
Expand Down
2 changes: 1 addition & 1 deletion codegen/src/filters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def get_class_name(klass)

def get_expanded_class_name(klass)
components = klass.name.split("::")
while !["Resources", "Common", "Services"].include?(components.first)
while !["Resources", "Common", "Services", "Actions"].include?(components.first)
components.shift
end
components.shift
Expand Down
4 changes: 2 additions & 2 deletions lib/google/ads/google_ads/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Config
attr_accessor :login_customer_id
attr_accessor :linked_customer_id
attr_accessor :use_cloud_org_for_api_access
attr_accessor :gaada
attr_accessor :ads_assistant

attr_accessor :log_level
attr_accessor :log_target
Expand All @@ -60,7 +60,7 @@ def initialize(&block)
@login_customer_id = nil
@linked_customer_id = nil
@use_cloud_org_for_api_access = false
@gaada = nil
@ads_assistant = nil

@log_level = nil
@log_target = nil
Expand Down
2 changes: 1 addition & 1 deletion lib/google/ads/google_ads/google_ads_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def load_environment_config
if @config.use_cloud_org_for_api_access.is_a?(String)
@config.use_cloud_org_for_api_access = @config.use_cloud_org_for_api_access.downcase == "true"
end
@config.gaada = ENV.fetch("GOOGLE_ADS_GAADA", @config.gaada)
@config.ads_assistant = ENV.fetch("GOOGLE_ADS_ASSISTANT", @config.ads_assistant)
end

# Return a service for the provided entity type. For example, passing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ module Ads
module GoogleAds
module Interceptors
class MetadataInterceptor < GRPC::ClientInterceptor
def initialize(developer_token, login_customer_id, linked_customer_id, use_cloud_org_for_api_access, gaada)
def initialize(developer_token, login_customer_id, linked_customer_id, use_cloud_org_for_api_access, ads_assistant)
super()
@developer_token = developer_token
@login_customer_id = login_customer_id
@linked_customer_id = linked_customer_id
@use_cloud_org_for_api_access = use_cloud_org_for_api_access
@gaada = gaada
@ads_assistant = ads_assistant
end

def request_response(request:, call:, method:, metadata: {})
Expand Down Expand Up @@ -61,8 +61,8 @@ def update_metadata(metadata)
# The python library iterates over metadata and modifies x-goog-api-client
# Here we can directly access it.
if metadata.key?(:"x-goog-api-client")
if @gaada
metadata[:"x-goog-api-client"] += " gaada/#{@gaada}"
if @ads_assistant
metadata[:"x-goog-api-client"] += " gaada/#{@ads_assistant}"
end

# Check if "pb" is already in the header
Expand Down
2 changes: 1 addition & 1 deletion lib/google/ads/google_ads/service_lookup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def call
config.login_customer_id,
config.linked_customer_id,
config.use_cloud_org_for_api_access,
config.gaada
config.ads_assistant
)

version_alternates = {}
Expand Down
26 changes: 2 additions & 24 deletions lib/google/ads/google_ads/v20/common/ad_asset_pb.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 2 additions & 24 deletions lib/google/ads/google_ads/v20/common/ad_type_infos_pb.rb

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 2 additions & 24 deletions lib/google/ads/google_ads/v20/common/asset_policy_pb.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 2 additions & 23 deletions lib/google/ads/google_ads/v20/common/asset_set_types_pb.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 2 additions & 25 deletions lib/google/ads/google_ads/v20/common/asset_types_pb.rb

Large diffs are not rendered by default.

25 changes: 2 additions & 23 deletions lib/google/ads/google_ads/v20/common/asset_usage_pb.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading