Class: AdRoll::Api::Ad
Class Method Summary collapse
- .clone(destination_url: nil, name: nil, headline: nil, body: nil) ⇒ Object
- .create(advertisable:, file:, dynamic_template_id: nil, destination_url: nil, name: nil, headline: nil, body: nil, message: nil, product: nil, logo: nil, background: nil) ⇒ Object
- .edit(ad:, destination_url: nil, name: nil, headline: nil, body: nil) ⇒ Object
- .get(ad:) ⇒ Object
- .set_outline(ad:) ⇒ Object
Class Method Details
.clone(destination_url: nil, name: nil, headline: nil, body: nil) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# 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) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# 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) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 |
# 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:) ⇒ Object
48 49 50 51 52 53 54 |
# 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:) ⇒ Object
56 57 58 59 60 61 62 |
# File 'lib/adroll/ad.rb', line 56 def set_outline(ad:) params = { ad: ad }.reject { |_, value| value.nil? } call_api(:get, __method__, params) end |