class AdRoll::Api::Ad

Public Class Methods

clone(destination_url: nil, name: nil, headline: nil, body: nil) click to toggle source
# File lib/adroll/ad.rb, line 7
def clone(destination_url: nil, name: nil, headline: nil, body: nil)
  params = {
    destination_url: destination_url,
    name: name,
    headline: headline,
    body: body
  }.reject { |_, value| value.nil? }

  call_api(:post, __method__, params)
end
create(advertisable:, file:, dynamic_template_id: nil, destination_url: nil, name: nil, headline: nil, body: nil, message: nil, product: nil, logo: nil, background: nil) click to toggle source
# File lib/adroll/ad.rb, line 18
def create(advertisable:, file:, dynamic_template_id: nil, destination_url: nil, name: nil,
           headline: nil, body: nil, message: nil, product: nil, logo: nil, background: nil)
  params = {
    advertisable: advertisable,
    file: file,
    dynamic_template_id: dynamic_template_id,
    destination_url: destination_url,
    name: name,
    headline: headline,
    body: body,
    product: product,
    logo: logo,
    background: background
  }.reject { |_, value| value.nil? }

  call_api(:post, __method__, params)
end
edit(ad:, destination_url: nil, name: nil, headline: nil, body: nil) click to toggle source
# File lib/adroll/ad.rb, line 36
def edit(ad:, destination_url: nil, name: nil, headline: nil, body: nil)
  params = {
    ad: ad,
    destination_url: destination_url,
    name: name,
    headline: headline,
    body: body
  }.reject { |_, value| value.nil? }

  call_api(:put, __method__, params)
end
get(ad:) click to toggle source
# File lib/adroll/ad.rb, line 48
def get(ad:)
  params = {
    ad: ad
  }.reject { |_, value| value.nil? }

  call_api(:get, __method__, params)
end
set_outline(ad:) click to toggle source
# File lib/adroll/ad.rb, line 56
def set_outline(ad:)
  params = {
    ad: ad
  }.reject { |_, value| value.nil? }

  call_api(:get, __method__, params)
end