Class: BingAdsApi::MobileAd

Inherits:
Ad show all
Defined in:
lib/bing-ads-api/data/ad.rb

Overview

Public : Defines a mobile ad. A mobile ad is displayed to a user when the ad is viewed on a low-fi mobile device.

Reference: msdn.microsoft.com/en-US/library/bing-ads-campaign-management-mobilead.aspx

Author

[email protected]

Instance Attribute Summary collapse

Attributes inherited from Ad

#device_preference, #editorial_status, #id, #status, #type

Instance Method Summary collapse

Methods inherited from DataObject

#initialize, #to_s

Methods included from SOAPHasheable

#date_to_hash, #get_attribute_key, #normalize_hash_keys, #object_to_hash

Constructor Details

This class inherits a constructor from BingAdsApi::DataObject

Instance Attribute Details

#business_nameObject

Returns the value of attribute business_name.



70
71
72
# File 'lib/bing-ads-api/data/ad.rb', line 70

def business_name
  @business_name
end

#destination_urlObject

Returns the value of attribute destination_url.



70
71
72
# File 'lib/bing-ads-api/data/ad.rb', line 70

def destination_url
  @destination_url
end

#display_urlObject

Returns the value of attribute display_url.



70
71
72
# File 'lib/bing-ads-api/data/ad.rb', line 70

def display_url
  @display_url
end

#phone_numberObject

Returns the value of attribute phone_number.



70
71
72
# File 'lib/bing-ads-api/data/ad.rb', line 70

def phone_number
  @phone_number
end

#textObject

Returns the value of attribute text.



70
71
72
# File 'lib/bing-ads-api/data/ad.rb', line 70

def text
  @text
end

#titleObject

Returns the value of attribute title.



70
71
72
# File 'lib/bing-ads-api/data/ad.rb', line 70

def title
  @title
end

Instance Method Details

#to_hash(keys = :underscore) ⇒ Object

Public : Specification of DataObject#to_hash method that ads the type attribute based on this specific class

Author

[email protected]

keys - specifies the keys case

Returns

Hash



84
85
86
87
88
# File 'lib/bing-ads-api/data/ad.rb', line 84

def to_hash(keys = :underscore)
	hash = super(keys)
	hash[get_attribute_key("type", keys)] = "Mobile"
	return hash
end