class Google::Apis::AdmobV1::AdUnit

Describes an AdMob ad unit.

Attributes

ad_format[RW]

AdFormat of the ad unit. Possible values are as follows: “BANNER” - Banner ad format. “BANNER_INTERSTITIAL” - Legacy format that can be used as either banner or interstitial. This format can no longer be created but can be targeted by mediation groups. “INTERSTITIAL” - A full screen ad. Supported ad types are “RICH_MEDIA” and “VIDEO”. “NATIVE” - Native ad format. “REWARDED” - An ad that, once viewed, gets a callback verifying the view so that a reward can be given to the user. Supported ad types are “RICH_MEDIA” (interactive) and video where video can not be excluded. Corresponds to the JSON property `adFormat` @return [String]

ad_types[RW]

Ad media type supported by this ad unit. Possible values as follows: “ RICH_MEDIA” - Text, image, and other non-video media. “VIDEO” - Video media. Corresponds to the JSON property `adTypes` @return [Array<String>]

ad_unit_id[RW]

The externally visible ID of the ad unit which can be used to integrate with the AdMob SDK. This is a read only property. Example: ca-app-pub- 9876543210987654/0123456789 Corresponds to the JSON property `adUnitId` @return [String]

app_id[RW]

The externally visible ID of the app this ad unit is associated with. Example: ca-app-pub-9876543210987654~0123456789 Corresponds to the JSON property `appId` @return [String]

display_name[RW]

The display name of the ad unit as shown in the AdMob UI, which is provided by the user. The maximum length allowed is 80 characters. Corresponds to the JSON property `displayName` @return [String]

name[RW]

Resource name for this ad unit. Format is accounts/`publisher_id`/adUnits/` ad_unit_id_fragment` Example: accounts/pub-9876543210987654/adUnits/0123456789 Corresponds to the JSON property `name` @return [String]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/admob_v1/classes.rb, line 72
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/admob_v1/classes.rb, line 77
def update!(**args)
  @ad_format = args[:ad_format] if args.key?(:ad_format)
  @ad_types = args[:ad_types] if args.key?(:ad_types)
  @ad_unit_id = args[:ad_unit_id] if args.key?(:ad_unit_id)
  @app_id = args[:app_id] if args.key?(:app_id)
  @display_name = args[:display_name] if args.key?(:display_name)
  @name = args[:name] if args.key?(:name)
end