Class: Google::Apis::AdsenseV2::AdClient

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/adsense_v2/classes.rb,
lib/google/apis/adsense_v2/representations.rb,
lib/google/apis/adsense_v2/representations.rb

Overview

Representation of an ad client. An ad client represents a user's subscription with a specific AdSense product.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AdClient

Returns a new instance of AdClient.



144
145
146
# File 'lib/google/apis/adsense_v2/classes.rb', line 144

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#nameString

Output only. Resource name of the ad client. Format: accounts/account/ adclients/adclient Corresponds to the JSON property name

Returns:

  • (String)


124
125
126
# File 'lib/google/apis/adsense_v2/classes.rb', line 124

def name
  @name
end

#product_codeString

Output only. Reporting product code of the ad client. For example, "AFC" for AdSense for Content. Corresponds to the PRODUCT_CODE dimension, and present only if the ad client supports reporting. Corresponds to the JSON property productCode

Returns:

  • (String)


131
132
133
# File 'lib/google/apis/adsense_v2/classes.rb', line 131

def product_code
  @product_code
end

#reporting_dimension_idString

Output only. Unique ID of the ad client as used in the AD_CLIENT_ID reporting dimension. Present only if the ad client supports reporting. Corresponds to the JSON property reportingDimensionId

Returns:

  • (String)


137
138
139
# File 'lib/google/apis/adsense_v2/classes.rb', line 137

def reporting_dimension_id
  @reporting_dimension_id
end

#stateString

Output only. State of the ad client. Corresponds to the JSON property state

Returns:

  • (String)


142
143
144
# File 'lib/google/apis/adsense_v2/classes.rb', line 142

def state
  @state
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



149
150
151
152
153
154
# File 'lib/google/apis/adsense_v2/classes.rb', line 149

def update!(**args)
  @name = args[:name] if args.key?(:name)
  @product_code = args[:product_code] if args.key?(:product_code)
  @reporting_dimension_id = args[:reporting_dimension_id] if args.key?(:reporting_dimension_id)
  @state = args[:state] if args.key?(:state)
end