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_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.
      48 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  | 
    
      # File 'lib/google/ads/google_ads/config.rb', line 48 def initialize(&block) @refresh_token = nil @client_id = nil @client_secret = nil @keyfile = nil @impersonate = 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.
      46 47 48  | 
    
      # File 'lib/google/ads/google_ads/config.rb', line 46 def api_endpoint @api_endpoint end  | 
  
#authentication ⇒ Object
Returns the value of attribute authentication.
      30 31 32  | 
    
      # File 'lib/google/ads/google_ads/config.rb', line 30 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.
      32 33 34  | 
    
      # File 'lib/google/ads/google_ads/config.rb', line 32 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.
      34 35 36  | 
    
      # File 'lib/google/ads/google_ads/config.rb', line 34 def linked_customer_id @linked_customer_id end  | 
  
#log_level ⇒ Object
Returns the value of attribute log_level.
      37 38 39  | 
    
      # File 'lib/google/ads/google_ads/config.rb', line 37 def log_level @log_level end  | 
  
#log_target ⇒ Object
Returns the value of attribute log_target.
      38 39 40  | 
    
      # File 'lib/google/ads/google_ads/config.rb', line 38 def log_target @log_target end  | 
  
#logger ⇒ Object
Returns the value of attribute logger.
      39 40 41  | 
    
      # File 'lib/google/ads/google_ads/config.rb', line 39 def logger @logger end  | 
  
#login_customer_id ⇒ Object
Returns the value of attribute login_customer_id.
      33 34 35  | 
    
      # File 'lib/google/ads/google_ads/config.rb', line 33 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.
      41 42 43  | 
    
      # File 'lib/google/ads/google_ads/config.rb', line 41 def treat_deprecation_warnings_as_errors @treat_deprecation_warnings_as_errors end  | 
  
#use_cloud_org_for_api_access ⇒ Object
Returns the value of attribute use_cloud_org_for_api_access.
      35 36 37  | 
    
      # File 'lib/google/ads/google_ads/config.rb', line 35 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.
      44 45 46  | 
    
      # File 'lib/google/ads/google_ads/config.rb', line 44 def use_insecure_channel @use_insecure_channel end  | 
  
#warn_on_all_deprecations ⇒ Object
Returns the value of attribute warn_on_all_deprecations.
      42 43 44  | 
    
      # File 'lib/google/ads/google_ads/config.rb', line 42 def warn_on_all_deprecations @warn_on_all_deprecations end  | 
  
Instance Method Details
#configure {|_self| ... } ⇒ Object
      75 76 77  | 
    
      # File 'lib/google/ads/google_ads/config.rb', line 75 def configure(&block) yield self end  | 
  
#http_proxy ⇒ Object
      93 94 95  | 
    
      # File 'lib/google/ads/google_ads/config.rb', line 93 def http_proxy ENV["http_proxy"] end  | 
  
#http_proxy=(uri) ⇒ Object
      79 80 81 82 83 84 85 86 87 88 89 90 91  | 
    
      # File 'lib/google/ads/google_ads/config.rb', line 79 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  |