Class: FacebookAds::AdAudience
- Defined in:
- lib/facebook_ads/ad_audience.rb
Overview
Constant Summary collapse
- FIELDS =
%w[id account_id subtype name description approximate_count data_source delivery_status external_event_source lookalike_audience_ids lookalike_spec operation_status opt_out_link permission_for_actions pixel_id retention_days rule time_content_updated time_created time_updated].freeze
Instance Method Summary collapse
-
#ad_account ⇒ Object
belongs_to ad_account.
-
#share(account_id) ⇒ Object
actions.
Methods inherited from Base
all, delete, #destroy, find, find_by, get, paginate, post, #save, #update
Instance Method Details
#ad_account ⇒ Object
belongs_to ad_account
10 11 12 |
# File 'lib/facebook_ads/ad_audience.rb', line 10 def ad_account @ad_account ||= AdAccount.find("act_#{account_id}") end |
#share(account_id) ⇒ Object
actions
16 17 18 19 20 21 22 23 24 |
# File 'lib/facebook_ads/ad_audience.rb', line 16 def share(account_id) query = { share_with_object_id: account_id, share_with_object_type: 'Account' } result = AdAccount.post("/#{id}/share_with_objects", query: query) # result['success'] result # No idea what this response looks like. end |