Class: Google::Apis::AdexchangebuyerV1_4::Creative::NativeAd

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

Overview

If nativeAd is set, HTMLSnippet, videoVastXML, and the videoURL outside of nativeAd should not be set. (The videoURL inside nativeAd can be set.)

Defined Under Namespace

Classes: AppIcon, Image, Logo

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ NativeAd

Returns a new instance of NativeAd.


953
954
955
# File 'generated/google/apis/adexchangebuyer_v1_4/classes.rb', line 953

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

Instance Attribute Details

#advertiserString

Corresponds to the JSON property advertiser

Returns:

  • (String)

890
891
892
# File 'generated/google/apis/adexchangebuyer_v1_4/classes.rb', line 890

def advertiser
  @advertiser
end

#app_iconGoogle::Apis::AdexchangebuyerV1_4::Creative::NativeAd::AppIcon

The app icon, for app download ads. Corresponds to the JSON property appIcon


895
896
897
# File 'generated/google/apis/adexchangebuyer_v1_4/classes.rb', line 895

def app_icon
  @app_icon
end

#bodyString

A long description of the ad. Corresponds to the JSON property body

Returns:

  • (String)

900
901
902
# File 'generated/google/apis/adexchangebuyer_v1_4/classes.rb', line 900

def body
  @body
end

#call_to_actionString

A label for the button that the user is supposed to click. Corresponds to the JSON property callToAction

Returns:

  • (String)

905
906
907
# File 'generated/google/apis/adexchangebuyer_v1_4/classes.rb', line 905

def call_to_action
  @call_to_action
end

The URL that the browser/SDK will load when the user clicks the ad. Corresponds to the JSON property clickLinkUrl

Returns:

  • (String)

910
911
912
# File 'generated/google/apis/adexchangebuyer_v1_4/classes.rb', line 910

def click_link_url
  @click_link_url
end

#click_tracking_urlString

The URL to use for click tracking. Corresponds to the JSON property clickTrackingUrl

Returns:

  • (String)

915
916
917
# File 'generated/google/apis/adexchangebuyer_v1_4/classes.rb', line 915

def click_tracking_url
  @click_tracking_url
end

#headlineString

A short title for the ad. Corresponds to the JSON property headline

Returns:

  • (String)

920
921
922
# File 'generated/google/apis/adexchangebuyer_v1_4/classes.rb', line 920

def headline
  @headline
end

#imageGoogle::Apis::AdexchangebuyerV1_4::Creative::NativeAd::Image

A large image. Corresponds to the JSON property image


925
926
927
# File 'generated/google/apis/adexchangebuyer_v1_4/classes.rb', line 925

def image
  @image
end

#impression_tracking_urlArray<String>

The URLs are called when the impression is rendered. Corresponds to the JSON property impressionTrackingUrl

Returns:

  • (Array<String>)

930
931
932
# File 'generated/google/apis/adexchangebuyer_v1_4/classes.rb', line 930

def impression_tracking_url
  @impression_tracking_url
end

#logoGoogle::Apis::AdexchangebuyerV1_4::Creative::NativeAd::Logo

A smaller image, for the advertiser logo. Corresponds to the JSON property logo


935
936
937
# File 'generated/google/apis/adexchangebuyer_v1_4/classes.rb', line 935

def 
  @logo
end

#priceString

The price of the promoted app including the currency info. Corresponds to the JSON property price

Returns:

  • (String)

940
941
942
# File 'generated/google/apis/adexchangebuyer_v1_4/classes.rb', line 940

def price
  @price
end

#star_ratingFloat

The app rating in the app store. Must be in the range [0-5]. Corresponds to the JSON property starRating

Returns:

  • (Float)

945
946
947
# File 'generated/google/apis/adexchangebuyer_v1_4/classes.rb', line 945

def star_rating
  @star_rating
end

#video_urlString

The URL of the XML VAST for a native ad. Note this is a separate field from resource.video_url. Corresponds to the JSON property videoURL

Returns:

  • (String)

951
952
953
# File 'generated/google/apis/adexchangebuyer_v1_4/classes.rb', line 951

def video_url
  @video_url
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
# File 'generated/google/apis/adexchangebuyer_v1_4/classes.rb', line 958

def update!(**args)
  @advertiser = args[:advertiser] if args.key?(:advertiser)
  @app_icon = args[:app_icon] if args.key?(:app_icon)
  @body = args[:body] if args.key?(:body)
  @call_to_action = args[:call_to_action] if args.key?(:call_to_action)
  @click_link_url = args[:click_link_url] if args.key?(:click_link_url)
  @click_tracking_url = args[:click_tracking_url] if args.key?(:click_tracking_url)
  @headline = args[:headline] if args.key?(:headline)
  @image = args[:image] if args.key?(:image)
  @impression_tracking_url = args[:impression_tracking_url] if args.key?(:impression_tracking_url)
  @logo = args[:logo] if args.key?(:logo)
  @price = args[:price] if args.key?(:price)
  @star_rating = args[:star_rating] if args.key?(:star_rating)
  @video_url = args[:video_url] if args.key?(:video_url)
end