Class: Google::Apis::AdmobV1beta::AdUnit
- Inherits:
-
Object
- Object
- Google::Apis::AdmobV1beta::AdUnit
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/admob_v1beta/classes.rb,
lib/google/apis/admob_v1beta/representations.rb,
lib/google/apis/admob_v1beta/representations.rb
Overview
Describes an AdMob ad unit.
Instance Attribute Summary collapse
-
#ad_format ⇒ String
AdFormat of the ad unit.
-
#ad_types ⇒ Array<String>
Ad media type supported by this ad unit.
-
#ad_unit_id ⇒ String
The externally visible ID of the ad unit which can be used to integrate with the AdMob SDK.
-
#app_id ⇒ String
The externally visible ID of the app this ad unit is associated with.
-
#display_name ⇒ String
The display name of the ad unit as shown in the AdMob UI, which is provided by the user.
-
#name ⇒ String
Resource name for this ad unit.
-
#reward_settings ⇒ Google::Apis::AdmobV1beta::AdUnitRewardSettings
Settings for a rewarded ad unit.
Instance Method Summary collapse
-
#initialize(**args) ⇒ AdUnit
constructor
A new instance of AdUnit.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ AdUnit
Returns a new instance of AdUnit.
111 112 113 |
# File 'lib/google/apis/admob_v1beta/classes.rb', line 111 def initialize(**args) update!(**args) end |
Instance Attribute Details
#ad_format ⇒ String
AdFormat of the ad unit. Possible values are as follows: "APP_OPEN" - App Open
ad format. "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. "
REWARDED_INTERSTITIAL" - Rewarded Interstitial ad format. Only supports video
ad type. See https://support.google.com/admob/answer/9884467.
Corresponds to the JSON property adFormat
73 74 75 |
# File 'lib/google/apis/admob_v1beta/classes.rb', line 73 def ad_format @ad_format end |
#ad_types ⇒ Array<String>
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
79 80 81 |
# File 'lib/google/apis/admob_v1beta/classes.rb', line 79 def ad_types @ad_types end |
#ad_unit_id ⇒ String
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
86 87 88 |
# File 'lib/google/apis/admob_v1beta/classes.rb', line 86 def ad_unit_id @ad_unit_id end |
#app_id ⇒ String
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
92 93 94 |
# File 'lib/google/apis/admob_v1beta/classes.rb', line 92 def app_id @app_id end |
#display_name ⇒ String
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
98 99 100 |
# File 'lib/google/apis/admob_v1beta/classes.rb', line 98 def display_name @display_name end |
#name ⇒ String
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
104 105 106 |
# File 'lib/google/apis/admob_v1beta/classes.rb', line 104 def name @name end |
#reward_settings ⇒ Google::Apis::AdmobV1beta::AdUnitRewardSettings
Settings for a rewarded ad unit.
Corresponds to the JSON property rewardSettings
109 110 111 |
# File 'lib/google/apis/admob_v1beta/classes.rb', line 109 def reward_settings @reward_settings end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
116 117 118 119 120 121 122 123 124 |
# File 'lib/google/apis/admob_v1beta/classes.rb', line 116 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) @reward_settings = args[:reward_settings] if args.key?(:reward_settings) end |