Class: AdRoll::Api::Advertisable
- Defined in:
- lib/adroll/advertisable.rb
Class Method Summary collapse
- .create(name: nil, organization:, set_as_default: false, url: nil, product_name: nil) ⇒ Object
- .edit(advertisable:, click_through_conversion_window: nil, name: nil, path_name: nil, url: nil, product_name: nil, view_through_conversion_window: nil) ⇒ Object
- .enable_rollcrawl(advertisable:, url:) ⇒ Object
- .get(advertisable:) ⇒ Object
- .get_adgroups(advertisable:, camp_active: true, camp_statuses: nil, camp_blacklist_statuses: nil, camp_type: nil, statuses: %w(approved admin_review paused admin_paused),, blacklist_statuses: nil) ⇒ Object
- .get_ads(advertisable:, is_active: true, statuses: nil, types: nil, width: nil, height: nil) ⇒ Object
- .get_campaigns(advertisable:, is_active: true, statuses: nil, types: nil, blacklist_statuses: nil) ⇒ Object
- .get_coops(advertisable:, filter_active:, coops_active: true) ⇒ Object
- .get_pixel(advertisable:) ⇒ Object
- .get_segments(advertisable:) ⇒ Object
Class Method Details
.create(name: nil, organization:, set_as_default: false, url: nil, product_name: nil) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/adroll/advertisable.rb', line 5 def create(name: nil, organization:, set_as_default: false, url: nil, product_name: nil) params = { name: name, organization: organization, set_as_default: set_as_default, url: url, product_name: product_name }.reject { |_, value| value.nil? } call_api(:post, __method__, params) end |
.edit(advertisable:, click_through_conversion_window: nil, name: nil, path_name: nil, url: nil, product_name: nil, view_through_conversion_window: nil) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/adroll/advertisable.rb', line 17 def edit(advertisable:, click_through_conversion_window: nil, name: nil, path_name: nil, url: nil, product_name: nil, view_through_conversion_window: nil) params = { advertisable: advertisable, click_through_conversion_window: click_through_conversion_window, name: name, path_name: path_name, url: url, product_name: product_name, view_through_conversion_window: view_through_conversion_window }.reject { |_, value| value.nil? } call_api(:put, __method__, params) end |
.enable_rollcrawl(advertisable:, url:) ⇒ Object
33 34 35 36 37 38 39 40 |
# File 'lib/adroll/advertisable.rb', line 33 def enable_rollcrawl(advertisable:, url:) params = { advertisable: advertisable, url: url } call_api(:get, __method__, params) end |
.get(advertisable:) ⇒ Object
42 43 44 45 46 47 48 |
# File 'lib/adroll/advertisable.rb', line 42 def get(advertisable:) params = { advertisable: advertisable } call_api(:get, __method__, params) end |
.get_adgroups(advertisable:, camp_active: true, camp_statuses: nil, camp_blacklist_statuses: nil, camp_type: nil, statuses: %w(approved admin_review paused admin_paused),, blacklist_statuses: nil) ⇒ Object
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/adroll/advertisable.rb', line 50 def get_adgroups(advertisable:, camp_active: true, camp_statuses: nil, camp_blacklist_statuses: nil, camp_type: nil, statuses: %w(approved admin_review paused admin_paused), blacklist_statuses: nil) params = { advertisable: advertisable, camp_active: camp_active, camp_statuses: camp_statuses, camp_blacklist_statuses: camp_blacklist_statuses, camp_type: camp_type, statuses: statuses, blacklist_statuses: blacklist_statuses }.reject { |_, value| value.nil? } call_api(:get, __method__, params) end |
.get_ads(advertisable:, is_active: true, statuses: nil, types: nil, width: nil, height: nil) ⇒ Object
67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/adroll/advertisable.rb', line 67 def get_ads(advertisable:, is_active: true, statuses: nil, types: nil, width: nil, height: nil) params = { advertisable: advertisable, is_active: is_active, statuses: statuses, types: types, width: width, height: height }.reject { |_, value| value.nil? } call_api(:get, __method__, params) end |
.get_campaigns(advertisable:, is_active: true, statuses: nil, types: nil, blacklist_statuses: nil) ⇒ Object
80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/adroll/advertisable.rb', line 80 def get_campaigns(advertisable:, is_active: true, statuses: nil, types: nil, blacklist_statuses: nil) params = { advertisable: advertisable, is_active: is_active, statuses: statuses, blacklist_statues: blacklist_statuses, types: types }.reject { |_, value| value.nil? } call_api(:get, __method__, params) end |
.get_coops(advertisable:, filter_active:, coops_active: true) ⇒ Object
92 93 94 95 96 97 98 99 100 |
# File 'lib/adroll/advertisable.rb', line 92 def get_coops(advertisable:, filter_active:, coops_active: true) params = { advertisable: advertisable, filter_active: filter_active, coops_active: coops_active }.reject { |_, value| value.nil? } call_api(:get, __method__, params) end |
.get_pixel(advertisable:) ⇒ Object
102 103 104 105 106 107 108 |
# File 'lib/adroll/advertisable.rb', line 102 def get_pixel(advertisable:) params = { advertisable: advertisable } call_api(:get, __method__, params) end |
.get_segments(advertisable:) ⇒ Object
110 111 112 113 114 115 116 |
# File 'lib/adroll/advertisable.rb', line 110 def get_segments(advertisable:) params = { advertisable: advertisable } call_api(:get, __method__, params) end |