google-ads-googleads 44.0.0 → 45.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/google_ads_config.rb +0 -6
- data/lib/google/ads/google_ads/config.rb +0 -2
- data/lib/google/ads/google_ads/google_ads_client.rb +0 -4
- data/lib/google/ads/google_ads/interceptors/metadata_interceptor.rb +3 -3
- data/lib/google/ads/google_ads/service_lookup.rb +3 -3
- data/lib/google/ads/google_ads/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c28c53baf520d9cec4c44bd2588568013155975e2b6129430e63658a9f03429c
|
|
4
|
+
data.tar.gz: 6ca25b89c86520b07b46604ed97a5804871e87e1386c45608e5a3651b524756b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: df207647a77cb06995f34e64856987631b441201eba1a64f144638eb080f2e34c060ff96c51d6ae68303e7c4741cd015cb311d8d074864101c5baa091fcb2305
|
|
7
|
+
data.tar.gz: 99da104b28c7216acafbd5a64db7f854a05824a6870e910f049fdb14ce3d12e4e0ac44c857e304d1abefe45f7280c05aa271bda854f52681537c9e65325d20f6
|
data/CHANGELOG.md
CHANGED
data/google_ads_config.rb
CHANGED
|
@@ -31,12 +31,6 @@ Google::Ads::GoogleAds::Config.new do |c|
|
|
|
31
31
|
# see: https://developers.google.com/identity/protocols/application-default-credentials.
|
|
32
32
|
c.use_application_default_credentials = false
|
|
33
33
|
|
|
34
|
-
# Whether to use the Google Cloud Organization of your Google Cloud
|
|
35
|
-
# project instead of developer token to determine your Google Ads API access levels.
|
|
36
|
-
# Use this flag only if you are enrolled into a limited pilot that supports
|
|
37
|
-
# this configuration.
|
|
38
|
-
c.use_cloud_org_for_api_access = false
|
|
39
|
-
|
|
40
34
|
# You can also authenticate using a service account. If "keyfile" is
|
|
41
35
|
# specified below, then service account authentication will be assumed and
|
|
42
36
|
# the above authentication fields ignored. Read more about service account
|
|
@@ -33,7 +33,6 @@ module Google
|
|
|
33
33
|
attr_accessor :developer_token
|
|
34
34
|
attr_accessor :login_customer_id
|
|
35
35
|
attr_accessor :linked_customer_id
|
|
36
|
-
attr_accessor :use_cloud_org_for_api_access
|
|
37
36
|
attr_accessor :ads_assistant
|
|
38
37
|
|
|
39
38
|
attr_accessor :log_level
|
|
@@ -59,7 +58,6 @@ module Google
|
|
|
59
58
|
@developer_token = nil
|
|
60
59
|
@login_customer_id = nil
|
|
61
60
|
@linked_customer_id = nil
|
|
62
|
-
@use_cloud_org_for_api_access = false
|
|
63
61
|
@ads_assistant = nil
|
|
64
62
|
|
|
65
63
|
@log_level = nil
|
|
@@ -110,10 +110,6 @@ module Google
|
|
|
110
110
|
# Client library-specific variables
|
|
111
111
|
@config.log_level = ENV.fetch("GOOGLE_ADS_RUBY_LOG_LEVEL", @config.log_level)
|
|
112
112
|
@config.http_proxy = ENV.fetch("GOOGLE_ADS_RUBY_HTTP_PROXY", @config.http_proxy)
|
|
113
|
-
@config.use_cloud_org_for_api_access = ENV.fetch("GOOGLE_ADS_USE_CLOUD_ORG_FOR_API_ACCESS", @config.use_cloud_org_for_api_access)
|
|
114
|
-
if @config.use_cloud_org_for_api_access.is_a?(String)
|
|
115
|
-
@config.use_cloud_org_for_api_access = @config.use_cloud_org_for_api_access.downcase == "true"
|
|
116
|
-
end
|
|
117
113
|
@config.ads_assistant = ENV.fetch("GOOGLE_ADS_ASSISTANT", @config.ads_assistant)
|
|
118
114
|
end
|
|
119
115
|
|
|
@@ -24,12 +24,11 @@ module Google
|
|
|
24
24
|
module GoogleAds
|
|
25
25
|
module Interceptors
|
|
26
26
|
class MetadataInterceptor < GRPC::ClientInterceptor
|
|
27
|
-
def initialize(developer_token, login_customer_id, linked_customer_id,
|
|
27
|
+
def initialize(developer_token, login_customer_id, linked_customer_id, ads_assistant)
|
|
28
28
|
super()
|
|
29
29
|
@developer_token = developer_token
|
|
30
30
|
@login_customer_id = login_customer_id
|
|
31
31
|
@linked_customer_id = linked_customer_id
|
|
32
|
-
@use_cloud_org_for_api_access = use_cloud_org_for_api_access
|
|
33
32
|
@ads_assistant = ads_assistant
|
|
34
33
|
end
|
|
35
34
|
|
|
@@ -46,7 +45,8 @@ module Google
|
|
|
46
45
|
private
|
|
47
46
|
|
|
48
47
|
def update_metadata(metadata)
|
|
49
|
-
if
|
|
48
|
+
# Add the developer-token header if provided.
|
|
49
|
+
if @developer_token && !@developer_token.empty?
|
|
50
50
|
metadata[:"developer-token"] = @developer_token
|
|
51
51
|
end
|
|
52
52
|
|
|
@@ -31,7 +31,6 @@ module Google
|
|
|
31
31
|
config.developer_token,
|
|
32
32
|
config.login_customer_id,
|
|
33
33
|
config.linked_customer_id,
|
|
34
|
-
config.use_cloud_org_for_api_access,
|
|
35
34
|
config.ads_assistant
|
|
36
35
|
)
|
|
37
36
|
|
|
@@ -89,8 +88,9 @@ module Google
|
|
|
89
88
|
headers[:"linked-customer-id"] = config.linked_customer_id.to_s
|
|
90
89
|
end
|
|
91
90
|
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
# Add the developer-token header if provided.
|
|
92
|
+
if config.developer_token && !config.developer_token.empty?
|
|
93
|
+
headers[:"developer-token"] = config.developer_token
|
|
94
94
|
end
|
|
95
95
|
|
|
96
96
|
if config.ads_assistant
|