Class: FacebookAds::AdImage
- Defined in:
- lib/facebook_ads/ad_image.rb
Overview
An ad image belongs to an ad account. An image will always produce the same hash. developers.facebook.com/docs/marketing-api/reference/ad-image
Constant Summary collapse
- FIELDS =
%w[id hash account_id name permalink_url original_width original_height].freeze
Class Method Summary collapse
Instance Method Summary collapse
- #destroy ⇒ Object
-
#hash ⇒ Object
@TODO: You are setting a key that conflicts with a built-in method FacebookAds::AdImage#hash defined in Hash.
- #update(_data) ⇒ Object
Methods inherited from Base
delete, get, paginate, post, #save
Class Method Details
.find(_id) ⇒ Object
9 10 11 |
# File 'lib/facebook_ads/ad_image.rb', line 9 def find(_id) raise Exception, 'NOT IMPLEMENTED' end |
Instance Method Details
#destroy ⇒ Object
26 27 28 |
# File 'lib/facebook_ads/ad_image.rb', line 26 def destroy super(path: "/act_#{account_id}/adimages", query: { hash: self[:hash] }) end |
#hash ⇒ Object
@TODO: You are setting a key that conflicts with a built-in method FacebookAds::AdImage#hash defined in Hash. This can cause unexpected behavior when accessing the key via as a property. You can still access the key via the #[] method.
18 19 20 |
# File 'lib/facebook_ads/ad_image.rb', line 18 def hash self[:hash] end |
#update(_data) ⇒ Object
22 23 24 |
# File 'lib/facebook_ads/ad_image.rb', line 22 def update(_data) raise Exception, 'NOT IMPLEMENTED' end |