Class: Google::Ads::GoogleAds::Config
- Inherits:
-
Object
- Object
- Google::Ads::GoogleAds::Config
- Defined in:
- lib/google/ads/google_ads/config.rb
Instance Attribute Summary collapse
-
#api_endpoint ⇒ Object
Returns the value of attribute api_endpoint.
-
#authentication ⇒ Object
Returns the value of attribute authentication.
-
#client_id ⇒ Object
Returns the value of attribute client_id.
-
#client_secret ⇒ Object
Returns the value of attribute client_secret.
-
#developer_token ⇒ Object
Returns the value of attribute developer_token.
-
#impersonate ⇒ Object
Returns the value of attribute impersonate.
-
#keyfile ⇒ Object
Returns the value of attribute keyfile.
-
#linked_customer_id ⇒ Object
Returns the value of attribute linked_customer_id.
-
#log_level ⇒ Object
Returns the value of attribute log_level.
-
#log_target ⇒ Object
Returns the value of attribute log_target.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#login_customer_id ⇒ Object
Returns the value of attribute login_customer_id.
-
#refresh_token ⇒ Object
Returns the value of attribute refresh_token.
-
#treat_deprecation_warnings_as_errors ⇒ Object
Returns the value of attribute treat_deprecation_warnings_as_errors.
-
#use_application_default_credentials ⇒ Object
Returns the value of attribute use_application_default_credentials.
-
#use_cloud_org_for_api_access ⇒ Object
Returns the value of attribute use_cloud_org_for_api_access.
-
#use_insecure_channel ⇒ Object
Returns the value of attribute use_insecure_channel.
-
#warn_on_all_deprecations ⇒ Object
Returns the value of attribute warn_on_all_deprecations.
Instance Method Summary collapse
- #configure {|_self| ... } ⇒ Object
- #http_proxy ⇒ Object
- #http_proxy=(uri) ⇒ Object
-
#initialize {|_self| ... } ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize {|_self| ... } ⇒ Config
Returns a new instance of Config.
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/google/ads/google_ads/config.rb', line 49 def initialize(&block) @refresh_token = nil @client_id = nil @client_secret = nil @keyfile = nil @impersonate = nil @use_application_default_credentials = nil @authentication = nil @developer_token = nil @login_customer_id = nil @linked_customer_id = nil @use_cloud_org_for_api_access = false @log_level = nil @log_target = nil @logger = nil @treat_deprecation_warnings_as_errors = false @warn_on_all_deprecations = false @use_insecure_channel = false @api_endpoint = nil yield self if block_given? end |
Instance Attribute Details
#api_endpoint ⇒ Object
Returns the value of attribute api_endpoint.
47 48 49 |
# File 'lib/google/ads/google_ads/config.rb', line 47 def api_endpoint @api_endpoint end |
#authentication ⇒ Object
Returns the value of attribute authentication.
31 32 33 |
# File 'lib/google/ads/google_ads/config.rb', line 31 def authentication @authentication end |
#client_id ⇒ Object
Returns the value of attribute client_id.
26 27 28 |
# File 'lib/google/ads/google_ads/config.rb', line 26 def client_id @client_id end |
#client_secret ⇒ Object
Returns the value of attribute client_secret.
27 28 29 |
# File 'lib/google/ads/google_ads/config.rb', line 27 def client_secret @client_secret end |
#developer_token ⇒ Object
Returns the value of attribute developer_token.
33 34 35 |
# File 'lib/google/ads/google_ads/config.rb', line 33 def developer_token @developer_token end |
#impersonate ⇒ Object
Returns the value of attribute impersonate.
29 30 31 |
# File 'lib/google/ads/google_ads/config.rb', line 29 def impersonate @impersonate end |
#keyfile ⇒ Object
Returns the value of attribute keyfile.
28 29 30 |
# File 'lib/google/ads/google_ads/config.rb', line 28 def keyfile @keyfile end |
#linked_customer_id ⇒ Object
Returns the value of attribute linked_customer_id.
35 36 37 |
# File 'lib/google/ads/google_ads/config.rb', line 35 def linked_customer_id @linked_customer_id end |
#log_level ⇒ Object
Returns the value of attribute log_level.
38 39 40 |
# File 'lib/google/ads/google_ads/config.rb', line 38 def log_level @log_level end |
#log_target ⇒ Object
Returns the value of attribute log_target.
39 40 41 |
# File 'lib/google/ads/google_ads/config.rb', line 39 def log_target @log_target end |
#logger ⇒ Object
Returns the value of attribute logger.
40 41 42 |
# File 'lib/google/ads/google_ads/config.rb', line 40 def logger @logger end |
#login_customer_id ⇒ Object
Returns the value of attribute login_customer_id.
34 35 36 |
# File 'lib/google/ads/google_ads/config.rb', line 34 def login_customer_id @login_customer_id end |
#refresh_token ⇒ Object
Returns the value of attribute refresh_token.
25 26 27 |
# File 'lib/google/ads/google_ads/config.rb', line 25 def refresh_token @refresh_token end |
#treat_deprecation_warnings_as_errors ⇒ Object
Returns the value of attribute treat_deprecation_warnings_as_errors.
42 43 44 |
# File 'lib/google/ads/google_ads/config.rb', line 42 def treat_deprecation_warnings_as_errors @treat_deprecation_warnings_as_errors end |
#use_application_default_credentials ⇒ Object
Returns the value of attribute use_application_default_credentials.
30 31 32 |
# File 'lib/google/ads/google_ads/config.rb', line 30 def use_application_default_credentials @use_application_default_credentials end |
#use_cloud_org_for_api_access ⇒ Object
Returns the value of attribute use_cloud_org_for_api_access.
36 37 38 |
# File 'lib/google/ads/google_ads/config.rb', line 36 def use_cloud_org_for_api_access @use_cloud_org_for_api_access end |
#use_insecure_channel ⇒ Object
Returns the value of attribute use_insecure_channel.
45 46 47 |
# File 'lib/google/ads/google_ads/config.rb', line 45 def use_insecure_channel @use_insecure_channel end |
#warn_on_all_deprecations ⇒ Object
Returns the value of attribute warn_on_all_deprecations.
43 44 45 |
# File 'lib/google/ads/google_ads/config.rb', line 43 def warn_on_all_deprecations @warn_on_all_deprecations end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
77 78 79 |
# File 'lib/google/ads/google_ads/config.rb', line 77 def configure(&block) yield self end |
#http_proxy ⇒ Object
95 96 97 |
# File 'lib/google/ads/google_ads/config.rb', line 95 def http_proxy ENV["http_proxy"] end |
#http_proxy=(uri) ⇒ Object
81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/google/ads/google_ads/config.rb', line 81 def http_proxy=(uri) if uri.nil? ENV["http_proxy"] = nil return end u = URI.parse(uri) if u.scheme != "http" && u.scheme != "https" raise ArgumentError, "#{uri} has invalid scheme #{u.scheme}, should be http or https" end ENV["http_proxy"] = uri end |