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.



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

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)


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

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)


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

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)


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

def reporting_dimension_id
  @reporting_dimension_id
end

#stateString

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

Returns:

  • (String)


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

def state
  @state
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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