Class: TheTradeDeskAds::Ad
- Defined in:
- lib/the_trade_desk_ads/ad.rb
Overview
An ad belongs to an ad set. It is created using an ad creative. developers.facebook.com/docs/marketing-api/reference/adgroup
Constant Summary collapse
- FIELDS =
%w[id account_id campaign_id adset_id adlabels bid_amount bid_info bid_type configured_status conversion_specs created_time creative effective_status last_updated_by_app_id name tracking_specs updated_time ad_review_feedback].freeze
- STATUSES =
%w[ACTIVE PAUSED DELETED PENDING_REVIEW DISAPPROVED PREAPPROVED PENDING_BILLING_INFO CAMPAIGN_PAUSED ARCHIVED ADSET_PAUSED].freeze
Instance Method Summary collapse
-
#ad_account ⇒ Object
belongs_to ad_account.
-
#ad_campaign ⇒ Object
belongs_to ad_campaign.
-
#ad_creative ⇒ Object
belongs_to ad_creative.
-
#ad_set ⇒ Object
belongs_to ad_set.
Methods inherited from Base
auth, delete, #destroy, find, get, paginate, post, #save, #update
Instance Method Details
#ad_account ⇒ Object
belongs_to ad_account
10 11 12 |
# File 'lib/the_trade_desk_ads/ad.rb', line 10 def ad_account @ad_set ||= AdAccount.find(account_id) end |
#ad_campaign ⇒ Object
belongs_to ad_campaign
16 17 18 |
# File 'lib/the_trade_desk_ads/ad.rb', line 16 def ad_campaign @ad_set ||= AdCampaign.find(campaign_id) end |
#ad_creative ⇒ Object
belongs_to ad_creative
28 29 30 |
# File 'lib/the_trade_desk_ads/ad.rb', line 28 def ad_creative @ad_creative ||= AdCreative.find(creative['id']) end |
#ad_set ⇒ Object
belongs_to ad_set
22 23 24 |
# File 'lib/the_trade_desk_ads/ad.rb', line 22 def ad_set @ad_set ||= AdSet.find(adset_id) end |