Class: Google::Apis::AdsenseV2::AdClientAdCode

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 the AdSense code for a given ad client. For more information, see About the AdSense code.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AdClientAdCode

Returns a new instance of AdClientAdCode.



177
178
179
# File 'lib/google/apis/adsense_v2/classes.rb', line 177

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

Instance Attribute Details

#ad_codeString

Output only. The AdSense code snippet to add to the head of an HTML page. Corresponds to the JSON property adCode

Returns:

  • (String)


165
166
167
# File 'lib/google/apis/adsense_v2/classes.rb', line 165

def ad_code
  @ad_code
end

#amp_bodyString

Output only. The AdSense code snippet to add to the body of an AMP page. Corresponds to the JSON property ampBody

Returns:

  • (String)


170
171
172
# File 'lib/google/apis/adsense_v2/classes.rb', line 170

def amp_body
  @amp_body
end

#amp_headString

Output only. The AdSense code snippet to add to the head of an AMP page. Corresponds to the JSON property ampHead

Returns:

  • (String)


175
176
177
# File 'lib/google/apis/adsense_v2/classes.rb', line 175

def amp_head
  @amp_head
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



182
183
184
185
186
# File 'lib/google/apis/adsense_v2/classes.rb', line 182

def update!(**args)
  @ad_code = args[:ad_code] if args.key?(:ad_code)
  @amp_body = args[:amp_body] if args.key?(:amp_body)
  @amp_head = args[:amp_head] if args.key?(:amp_head)
end