Sha256: 4dbd1b8abf50910593f0e65086f1bce0ee9b9e0ad95d3bbc9f00f01d6e0a6c69

Contents?: true

Size: 741 Bytes

Versions: 1

Compression:

Stored size: 741 Bytes

Contents

# frozen_string_literal: true

module FacebookAds
  # An image will always produce the same hash.
  # https://developers.facebook.com/docs/marketing-api/reference/ad-image
  class AdImage < Base
    FIELDS = %w[id hash account_id name permalink_url original_width original_height].freeze

    class << self
      def find(_id)
        raise NotImplementedError
      end
    end

    # @FIXME: You are setting a key that conflicts with a built-in method
    # FacebookAds::AdImage#hash defined in Hash.
    disable_warnings

    def hash
      self[:hash]
    end

    def update(_data)
      raise NotImplementedError
    end

    def destroy
      super(path: "/act_#{account_id}/adimages", query: { hash: self[:hash] })
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
facebook_ads-0.7.0 lib/facebook_ads/ad_image.rb