twitter-ads 9.0.0 → 11.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/lib/twitter-ads/account.rb +17 -1
  4. data/lib/twitter-ads/campaign/campaign.rb +2 -2
  5. data/lib/twitter-ads/campaign/line_item.rb +4 -4
  6. data/lib/twitter-ads/campaign/tracking_tags.rb +97 -0
  7. data/lib/twitter-ads/client.rb +1 -1
  8. data/lib/twitter-ads/creative/cards.rb +31 -22
  9. data/lib/twitter-ads/creative/cards_fetch.rb +2 -4
  10. data/lib/twitter-ads/creative/draft_tweet.rb +0 -1
  11. data/lib/twitter-ads/cursor.rb +2 -2
  12. data/lib/twitter-ads/enum.rb +5 -0
  13. data/lib/twitter-ads/resources/analytics.rb +1 -2
  14. data/lib/twitter-ads/targeting/{audience_summary.rb → audience_estimate.rb} +3 -3
  15. data/lib/twitter-ads/version.rb +1 -1
  16. data/lib/twitter-ads.rb +2 -5
  17. data/spec/fixtures/accounts_all.json +0 -5
  18. data/spec/fixtures/accounts_load.json +0 -1
  19. data/spec/fixtures/{audience_summary.json → audience_estimate.json} +0 -0
  20. data/spec/fixtures/cards_all.json +836 -0
  21. data/spec/fixtures/cards_load.json +42 -0
  22. data/spec/fixtures/line_items_all.json +0 -10
  23. data/spec/fixtures/line_items_load.json +0 -1
  24. data/spec/fixtures/tracking_tags_load.json +17 -0
  25. data/spec/twitter-ads/campaign/line_item_spec.rb +1 -1
  26. data/spec/twitter-ads/campaign/tracking_tag_spec.rb +58 -0
  27. data/spec/twitter-ads/creative/cards_spec.rb +52 -0
  28. data/spec/twitter-ads/targeting/{audience_summary_spec.rb → audience_estimate_spec.rb} +2 -2
  29. metadata +48 -41
  30. data/lib/twitter-ads/creative/image_app_download_card.rb +0 -49
  31. data/lib/twitter-ads/creative/video_app_download_card.rb +0 -50
  32. data/lib/twitter-ads/creative/video_website_card.rb +0 -50
  33. data/lib/twitter-ads/creative/website_card.rb +0 -45
@@ -0,0 +1,42 @@
1
+ {
2
+ "request": {
3
+ "params": {
4
+ "account_id": "2iqph",
5
+ "card_id": "1503831318555086849"
6
+ }
7
+ },
8
+ "data": {
9
+ "name": "my new card",
10
+ "components": [
11
+ {
12
+ "media_key": "13_794652834998325248",
13
+ "media_metadata": {
14
+ "13_794652834998325248": {
15
+ "type": "VIDEO",
16
+ "url": "https://video.twimg.com/amplify_video/794652834998325248/vid/640x360/pUgE2UKcfPwF_5Uh.mp4",
17
+ "width": 640,
18
+ "height": 360,
19
+ "video_duration": 7967,
20
+ "video_aspect_ratio": "16:9"
21
+ }
22
+ },
23
+ "type": "MEDIA"
24
+ },
25
+ {
26
+ "title": "Twitter",
27
+ "destination": {
28
+ "url": "http://twitter.com/login",
29
+ "type": "WEBSITE"
30
+ },
31
+ "type": "DETAILS"
32
+ }
33
+ ],
34
+ "id": "1503831318555086849",
35
+ "created_at": "2022-03-15T20:31:40Z",
36
+ "card_uri": "card://1503831318555086849",
37
+ "updated_at": "2022-03-15T20:31:40Z",
38
+ "deleted": false,
39
+ "card_type": "VIDEO_WEBSITE"
40
+ }
41
+ }
42
+
@@ -13,7 +13,6 @@
13
13
  "ALL_ON_TWITTER"
14
14
  ],
15
15
  "bid_amount_local_micro": 2000000,
16
- "automatically_select_bid": false,
17
16
  "advertiser_domain": null,
18
17
  "primary_web_event_tag": null,
19
18
  "charge_by": "ENGAGEMENT",
@@ -40,7 +39,6 @@
40
39
  "ALL_ON_TWITTER"
41
40
  ],
42
41
  "bid_amount_local_micro": 2000000,
43
- "automatically_select_bid": false,
44
42
  "advertiser_domain": null,
45
43
  "primary_web_event_tag": null,
46
44
  "charge_by": "ENGAGEMENT",
@@ -67,7 +65,6 @@
67
65
  "TWITTER_SEARCH"
68
66
  ],
69
67
  "bid_amount_local_micro": 100000,
70
- "automatically_select_bid": false,
71
68
  "advertiser_domain": null,
72
69
  "primary_web_event_tag": null,
73
70
  "charge_by": "ENGAGEMENT",
@@ -94,7 +91,6 @@
94
91
  "TWITTER_SEARCH"
95
92
  ],
96
93
  "bid_amount_local_micro": 500000,
97
- "automatically_select_bid": false,
98
94
  "advertiser_domain": null,
99
95
  "primary_web_event_tag": null,
100
96
  "charge_by": "ENGAGEMENT",
@@ -121,7 +117,6 @@
121
117
  "TWITTER_TIMELINE"
122
118
  ],
123
119
  "bid_amount_local_micro": 50000000,
124
- "automatically_select_bid": false,
125
120
  "advertiser_domain": null,
126
121
  "primary_web_event_tag": null,
127
122
  "charge_by": "ENGAGEMENT",
@@ -149,7 +144,6 @@
149
144
  "TWITTER_TIMELINE"
150
145
  ],
151
146
  "bid_amount_local_micro": 50000000,
152
- "automatically_select_bid": false,
153
147
  "advertiser_domain": null,
154
148
  "primary_web_event_tag": null,
155
149
  "charge_by": "ENGAGEMENT",
@@ -177,7 +171,6 @@
177
171
  "TWITTER_SEARCH"
178
172
  ],
179
173
  "bid_amount_local_micro": 50000000,
180
- "automatically_select_bid": false,
181
174
  "advertiser_domain": null,
182
175
  "primary_web_event_tag": null,
183
176
  "charge_by": "ENGAGEMENT",
@@ -204,7 +197,6 @@
204
197
  "TWITTER_TIMELINE"
205
198
  ],
206
199
  "bid_amount_local_micro": 500000,
207
- "automatically_select_bid": false,
208
200
  "advertiser_domain": null,
209
201
  "primary_web_event_tag": null,
210
202
  "charge_by": "ENGAGEMENT",
@@ -231,7 +223,6 @@
231
223
  "TWITTER_SEARCH"
232
224
  ],
233
225
  "bid_amount_local_micro": 50000000,
234
- "automatically_select_bid": false,
235
226
  "advertiser_domain": null,
236
227
  "primary_web_event_tag": null,
237
228
  "charge_by": "ENGAGEMENT",
@@ -258,7 +249,6 @@
258
249
  "TWITTER_TIMELINE"
259
250
  ],
260
251
  "bid_amount_local_micro": 2009999,
261
- "automatically_select_bid": false,
262
252
  "advertiser_domain": null,
263
253
  "primary_web_event_tag": null,
264
254
  "charge_by": "ENGAGEMENT",
@@ -8,7 +8,6 @@
8
8
  "ALL_ON_TWITTER"
9
9
  ],
10
10
  "bid_amount_local_micro": 2000000,
11
- "automatically_select_bid": false,
12
11
  "advertiser_domain": null,
13
12
  "primary_web_event_tag": null,
14
13
  "charge_by": "ENGAGEMENT",
@@ -0,0 +1,17 @@
1
+ {
2
+ "request": {
3
+ "params": {
4
+ "tracking_tag_id": "7035",
5
+ "account_id": "18ce54uhdu0"
6
+ }
7
+ },
8
+ "data": {
9
+ "line_item_id": "dmbc0",
10
+ "tracking_tag_url": "https://ad.doubleclick.net/ddm/trackimp/N1234.2061500TWITTER-OFFICIAL/B9156151.125630439;dc_trk_aid=1355;dc_trk_cid=8675309",
11
+ "tracking_tag_type": "IMPRESSION_TAG",
12
+ "id": "7035",
13
+ "created_at": "2021-11-16T00:12:26Z",
14
+ "updated_at": "2021-11-16T00:12:26Z",
15
+ "deleted": false
16
+ }
17
+ }
@@ -40,11 +40,11 @@ describe TwitterAds::LineItem do
40
40
  product_type
41
41
  placements
42
42
  bid_strategy
43
- automatically_select_bid
44
43
  bid_amount_local_micro
45
44
  total_budget_amount_local_micro
46
45
  goal
47
46
  ios_app_store_identifier
47
+ standard_delivery
48
48
  )
49
49
  include_examples 'object property check', read, write
50
50
 
@@ -0,0 +1,58 @@
1
+ # frozen_string_literal: true
2
+ # Copyright (C) 2019 Twitter, Inc.
3
+
4
+ require 'spec_helper'
5
+
6
+ describe TwitterAds::TrackingTag do
7
+
8
+ before(:each) do
9
+ stub_fixture(:get, :accounts_all, "#{ADS_API}/accounts")
10
+ stub_fixture(:get, :accounts_load, "#{ADS_API}/accounts/2iqph")
11
+ end
12
+
13
+ let(:client) do
14
+ Client.new(
15
+ Faker::Lorem.characters(15),
16
+ Faker::Lorem.characters(40),
17
+ "123456-#{Faker::Lorem.characters(40)}",
18
+ Faker::Lorem.characters(40)
19
+ )
20
+ end
21
+
22
+ let(:account) { client.accounts.first }
23
+
24
+ # check model properties
25
+ subject { described_class.new(account) }
26
+ read = %w(id)
27
+ write = %w(line_item_id tracking_tag_type tracking_tag_url)
28
+ include_examples 'object property check', read, write
29
+
30
+ describe '#create' do
31
+
32
+ let(:tracking_tag) { TwitterAds::TrackingTag.new(account) }
33
+ let!(:resource) { "#{ADS_API}/accounts/#{account.id}/tracking_tags" }
34
+ let!(:rel_path) { "/#{TwitterAds::API_VERSION}/accounts/#{account.id}/tracking_tags" }
35
+
36
+ before(:each) do
37
+ stub_fixture(:post, :tracking_tags_load, /#{resource}\?.*/)
38
+ end
39
+
40
+ it 'creates post request with line item ID and url' do
41
+ line_item_id = 'axe123'
42
+ tracking_tag_url = 'https://ad.doubleclick.net/ddm/trackimp/N1234.2061500TWITTER-OFFICIAL/B9156151.125630439;dc_trk_aid=1355;dc_trk_cid=8675309'
43
+ tracking_tag_type = 'IMPRESSION_TAG'
44
+
45
+ params = {
46
+ line_item_id: line_item_id,
47
+ tracking_tag_url: tracking_tag_url,
48
+ tracking_tag_type: tracking_tag_type
49
+ }
50
+ args = [account.client, :post, rel_path, params: params]
51
+
52
+ expect(Request).to receive(:new).with(*args).and_call_original
53
+ tracking_tag.create(line_item_id, tracking_tag_url)
54
+ end
55
+
56
+ end
57
+
58
+ end
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+ # Copyright (C) 2019 Twitter, Inc.
3
+
4
+ require 'spec_helper'
5
+
6
+ include TwitterAds::Enum
7
+
8
+ describe TwitterAds::Creative::Cards do
9
+
10
+ let!(:resource) { "#{ADS_API}/accounts/2iqph/cards" }
11
+
12
+ before(:each) do
13
+ stub_fixture(:get, :accounts_load, "#{ADS_API}/accounts/2iqph")
14
+
15
+ resource_collection = "#{ADS_API}/accounts/#{account.id}/cards"
16
+ stub_fixture(:get, :cards_all, resource_collection)
17
+
18
+ resource = "#{ADS_API}/accounts/#{account.id}/cards/1508693734346485761"
19
+ stub_fixture(:get, :cards_load, /#{resource}\?.*/)
20
+ end
21
+
22
+ let(:client) do
23
+ Client.new(
24
+ Faker::Lorem.characters(40),
25
+ Faker::Lorem.characters(40),
26
+ Faker::Lorem.characters(40),
27
+ Faker::Lorem.characters(40)
28
+ )
29
+ end
30
+
31
+ let(:account) { client.accounts('2iqph') }
32
+
33
+ it 'inspect Cards.load() response' do
34
+ card = described_class.load(account, '1508693734346485761')
35
+
36
+ expect(card).to be_instance_of(TwitterAds::Creative::Cards)
37
+ expect(card.id).to eq '1503831318555086849'
38
+ expect(card.card_type).to eq 'VIDEO_WEBSITE'
39
+ expect(card.card_uri).to eq 'card://1503831318555086849'
40
+ end
41
+
42
+ it 'inspect Cards.all() response' do
43
+ cards = described_class.all(account)
44
+
45
+ expect(cards).to be_instance_of(Cursor)
46
+ card = cards.first
47
+ expect(card.id).to eq '1340029888649076737'
48
+ expect(card.card_type).to eq 'VIDEO_WEBSITE'
49
+ expect(card.card_uri).to eq 'card://1340029888649076737'
50
+ end
51
+
52
+ end
@@ -3,12 +3,12 @@
3
3
 
4
4
  require 'spec_helper'
5
5
 
6
- describe TwitterAds::AudienceSummary do
6
+ describe TwitterAds::AudienceEstimate do
7
7
 
8
8
  before(:each) do
9
9
  stub_fixture(:get, :accounts_all, "#{ADS_API}/accounts")
10
10
  stub_fixture(:get, :accounts_load, "#{ADS_API}/accounts/2iqph")
11
- stub_fixture(:post, :audience_summary, "#{ADS_API}/accounts/2iqph/audience_summary")
11
+ stub_fixture(:post, :audience_estimate, "#{ADS_API}/accounts/2iqph/audience_estimate")
12
12
  end
13
13
 
14
14
  let(:client) do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twitter-ads
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.0.0
4
+ version: 11.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Babich
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2021-07-16 00:00:00.000000000 Z
15
+ date: 2022-05-27 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: multi_json
@@ -68,13 +68,13 @@ files:
68
68
  - lib/twitter-ads/campaign/organic_tweet.rb
69
69
  - lib/twitter-ads/campaign/promotable_user.rb
70
70
  - lib/twitter-ads/campaign/targeting_criteria.rb
71
+ - lib/twitter-ads/campaign/tracking_tags.rb
71
72
  - lib/twitter-ads/campaign/tweet.rb
72
73
  - lib/twitter-ads/client.rb
73
74
  - lib/twitter-ads/creative/account_media.rb
74
75
  - lib/twitter-ads/creative/cards.rb
75
76
  - lib/twitter-ads/creative/cards_fetch.rb
76
77
  - lib/twitter-ads/creative/draft_tweet.rb
77
- - lib/twitter-ads/creative/image_app_download_card.rb
78
78
  - lib/twitter-ads/creative/image_conversation_card.rb
79
79
  - lib/twitter-ads/creative/media_creative.rb
80
80
  - lib/twitter-ads/creative/media_library.rb
@@ -84,10 +84,7 @@ files:
84
84
  - lib/twitter-ads/creative/scheduled_tweet.rb
85
85
  - lib/twitter-ads/creative/tweet_previews.rb
86
86
  - lib/twitter-ads/creative/tweets.rb
87
- - lib/twitter-ads/creative/video_app_download_card.rb
88
87
  - lib/twitter-ads/creative/video_conversation_card.rb
89
- - lib/twitter-ads/creative/video_website_card.rb
90
- - lib/twitter-ads/creative/website_card.rb
91
88
  - lib/twitter-ads/cursor.rb
92
89
  - lib/twitter-ads/enum.rb
93
90
  - lib/twitter-ads/error.rb
@@ -104,7 +101,7 @@ files:
104
101
  - lib/twitter-ads/restapi.rb
105
102
  - lib/twitter-ads/settings/tax.rb
106
103
  - lib/twitter-ads/settings/user.rb
107
- - lib/twitter-ads/targeting/audience_summary.rb
104
+ - lib/twitter-ads/targeting/audience_estimate.rb
108
105
  - lib/twitter-ads/targeting_criteria/app_store_category.rb
109
106
  - lib/twitter-ads/targeting_criteria/conversation.rb
110
107
  - lib/twitter-ads/targeting_criteria/device.rb
@@ -124,9 +121,11 @@ files:
124
121
  - spec/fixtures/accounts_load.json
125
122
  - spec/fixtures/app_lists_all.json
126
123
  - spec/fixtures/app_lists_load.json
127
- - spec/fixtures/audience_summary.json
124
+ - spec/fixtures/audience_estimate.json
128
125
  - spec/fixtures/campaigns_all.json
129
126
  - spec/fixtures/campaigns_load.json
127
+ - spec/fixtures/cards_all.json
128
+ - spec/fixtures/cards_load.json
130
129
  - spec/fixtures/custom_audiences_all.json
131
130
  - spec/fixtures/custom_audiences_load.json
132
131
  - spec/fixtures/funding_instruments_all.json
@@ -142,6 +141,7 @@ files:
142
141
  - spec/fixtures/reach_estimate.json
143
142
  - spec/fixtures/tailored_audiences_all.json
144
143
  - spec/fixtures/targeted_audiences.json
144
+ - spec/fixtures/tracking_tags_load.json
145
145
  - spec/fixtures/tweet_previews.json
146
146
  - spec/fixtures/videos_all.json
147
147
  - spec/fixtures/videos_load.json
@@ -154,8 +154,10 @@ files:
154
154
  - spec/twitter-ads/campaign/app_list_spec.rb
155
155
  - spec/twitter-ads/campaign/line_item_spec.rb
156
156
  - spec/twitter-ads/campaign/targeting_criteria_spec.rb
157
+ - spec/twitter-ads/campaign/tracking_tag_spec.rb
157
158
  - spec/twitter-ads/campaign/tweet_spec.rb
158
159
  - spec/twitter-ads/client_spec.rb
160
+ - spec/twitter-ads/creative/cards_spec.rb
159
161
  - spec/twitter-ads/creative/media_creative_spec.rb
160
162
  - spec/twitter-ads/creative/promoted_account_spec.rb
161
163
  - spec/twitter-ads/creative/promoted_tweet_spec.rb
@@ -164,7 +166,7 @@ files:
164
166
  - spec/twitter-ads/placements_spec.rb
165
167
  - spec/twitter-ads/rate_limit_spec.rb
166
168
  - spec/twitter-ads/retry_count_spec.rb
167
- - spec/twitter-ads/targeting/audience_summary_spec.rb
169
+ - spec/twitter-ads/targeting/audience_estimate_spec.rb
168
170
  - spec/twitter-ads/utils_spec.rb
169
171
  - twitter-ads.gemspec
170
172
  homepage: https://github.com/twitterdev/twitter-ruby-ads-sdk
@@ -186,55 +188,60 @@ required_rubygems_version: !ruby/object:Gem::Requirement
186
188
  - !ruby/object:Gem::Version
187
189
  version: 2.6.0
188
190
  requirements: []
189
- rubygems_version: 3.2.22
191
+ rubygems_version: 3.1.6
190
192
  signing_key:
191
193
  specification_version: 4
192
194
  summary: The officially supported Twitter Ads API SDK for Ruby.
193
195
  test_files:
194
- - spec/fixtures/accounts_all.json
195
- - spec/fixtures/accounts_features.json
196
- - spec/fixtures/accounts_load.json
196
+ - spec/quality_spec.rb
197
+ - spec/fixtures/promoted_tweets_all.json
197
198
  - spec/fixtures/app_lists_all.json
199
+ - spec/fixtures/accounts_features.json
200
+ - spec/fixtures/tracking_tags_load.json
201
+ - spec/fixtures/line_items_load.json
202
+ - spec/fixtures/line_items_all.json
203
+ - spec/fixtures/campaigns_load.json
198
204
  - spec/fixtures/app_lists_load.json
199
- - spec/fixtures/audience_summary.json
200
205
  - spec/fixtures/campaigns_all.json
201
- - spec/fixtures/campaigns_load.json
202
- - spec/fixtures/custom_audiences_all.json
203
- - spec/fixtures/custom_audiences_load.json
204
- - spec/fixtures/funding_instruments_all.json
206
+ - spec/fixtures/tailored_audiences_all.json
207
+ - spec/fixtures/tweet_previews.json
205
208
  - spec/fixtures/funding_instruments_load.json
206
- - spec/fixtures/line_items_all.json
207
- - spec/fixtures/line_items_load.json
208
- - spec/fixtures/no_content.json
209
- - spec/fixtures/placements.json
210
- - spec/fixtures/promotable_users_all.json
209
+ - spec/fixtures/accounts_load.json
210
+ - spec/fixtures/cards_all.json
211
+ - spec/fixtures/videos_load.json
212
+ - spec/fixtures/videos_all.json
211
213
  - spec/fixtures/promotable_users_load.json
212
- - spec/fixtures/promoted_tweets_all.json
213
- - spec/fixtures/promoted_tweets_load.json
214
+ - spec/fixtures/accounts_all.json
214
215
  - spec/fixtures/reach_estimate.json
215
- - spec/fixtures/tailored_audiences_all.json
216
216
  - spec/fixtures/targeted_audiences.json
217
- - spec/fixtures/tweet_previews.json
218
- - spec/fixtures/videos_all.json
219
- - spec/fixtures/videos_load.json
220
- - spec/quality_spec.rb
217
+ - spec/fixtures/audience_estimate.json
218
+ - spec/fixtures/promoted_tweets_load.json
219
+ - spec/fixtures/custom_audiences_load.json
220
+ - spec/fixtures/funding_instruments_all.json
221
+ - spec/fixtures/promotable_users_all.json
222
+ - spec/fixtures/placements.json
223
+ - spec/fixtures/cards_load.json
224
+ - spec/fixtures/no_content.json
225
+ - spec/fixtures/custom_audiences_all.json
221
226
  - spec/shared/properties.rb
222
- - spec/spec_helper.rb
223
227
  - spec/support/helpers.rb
228
+ - spec/twitter-ads/placements_spec.rb
224
229
  - spec/twitter-ads/account_spec.rb
225
- - spec/twitter-ads/audiences/custom_audience_spec.rb
226
- - spec/twitter-ads/campaign/app_list_spec.rb
227
- - spec/twitter-ads/campaign/line_item_spec.rb
230
+ - spec/twitter-ads/retry_count_spec.rb
231
+ - spec/twitter-ads/client_spec.rb
228
232
  - spec/twitter-ads/campaign/targeting_criteria_spec.rb
233
+ - spec/twitter-ads/campaign/line_item_spec.rb
229
234
  - spec/twitter-ads/campaign/tweet_spec.rb
230
- - spec/twitter-ads/client_spec.rb
231
- - spec/twitter-ads/creative/media_creative_spec.rb
235
+ - spec/twitter-ads/campaign/tracking_tag_spec.rb
236
+ - spec/twitter-ads/campaign/app_list_spec.rb
237
+ - spec/twitter-ads/utils_spec.rb
238
+ - spec/twitter-ads/audiences/custom_audience_spec.rb
239
+ - spec/twitter-ads/cursor_spec.rb
240
+ - spec/twitter-ads/creative/cards_spec.rb
232
241
  - spec/twitter-ads/creative/promoted_account_spec.rb
233
242
  - spec/twitter-ads/creative/promoted_tweet_spec.rb
234
243
  - spec/twitter-ads/creative/tweet_previews_spec.rb
235
- - spec/twitter-ads/cursor_spec.rb
236
- - spec/twitter-ads/placements_spec.rb
244
+ - spec/twitter-ads/creative/media_creative_spec.rb
237
245
  - spec/twitter-ads/rate_limit_spec.rb
238
- - spec/twitter-ads/retry_count_spec.rb
239
- - spec/twitter-ads/targeting/audience_summary_spec.rb
240
- - spec/twitter-ads/utils_spec.rb
246
+ - spec/twitter-ads/targeting/audience_estimate_spec.rb
247
+ - spec/spec_helper.rb
@@ -1,49 +0,0 @@
1
- # frozen_string_literal: true
2
- # Copyright (C) 2019 Twitter, Inc.
3
-
4
- module TwitterAds
5
- module Creative
6
-
7
- class ImageAppDownloadCard
8
-
9
- include TwitterAds::DSL
10
- include TwitterAds::Resource
11
- include TwitterAds::Persistence
12
-
13
- attr_reader :account
14
-
15
- property :card_type, read_only: true
16
- property :card_uri, read_only: true
17
- property :created_at, type: :time, read_only: true
18
- property :deleted, type: :bool, read_only: true
19
- property :id, read_only: true
20
- property :image_display_height, read_only: true
21
- property :image_display_width, read_only: true
22
- property :updated_at, type: :time, read_only: true
23
- property :media_url, read_only: true
24
-
25
- property :country_code
26
- property :app_cta
27
- property :googleplay_app_id
28
- property :googleplay_deep_link
29
- property :iphone_app_id
30
- property :iphone_deep_link
31
- property :ipad_app_id
32
- property :ipad_deep_link
33
- property :name
34
- property :media_key
35
-
36
- RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" \
37
- 'accounts/%{account_id}/cards/image_app_download' # @api private
38
- RESOURCE = "/#{TwitterAds::API_VERSION}/" \
39
- 'accounts/%{account_id}/cards/image_app_download/%{id}' # @api private
40
-
41
- def initialize(account)
42
- @account = account
43
- self
44
- end
45
-
46
- end
47
-
48
- end
49
- end
@@ -1,50 +0,0 @@
1
- # frozen_string_literal: true
2
- # Copyright (C) 2019 Twitter, Inc.
3
-
4
- module TwitterAds
5
- module Creative
6
-
7
- class VideoAppDownloadCard
8
-
9
- include TwitterAds::DSL
10
- include TwitterAds::Resource
11
- include TwitterAds::Persistence
12
-
13
- attr_reader :account
14
-
15
- property :card_type, read_only: true
16
- property :card_uri, read_only: true
17
- property :created_at, type: :time, read_only: true
18
- property :deleted, type: :bool, read_only: true
19
- property :id, read_only: true
20
- property :updated_at, type: :time, read_only: true
21
- property :video_owner_id, read_only: true
22
- property :poster_media_url, read_only: true
23
- property :media_url, read_only: true
24
-
25
- property :country_code
26
- property :app_cta
27
- property :poster_media_key
28
- property :ipad_app_id
29
- property :ipad_deep_link
30
- property :iphone_app_id
31
- property :iphone_deep_link
32
- property :googleplay_app_id
33
- property :googleplay_deep_link
34
- property :name
35
- property :media_key
36
-
37
- RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" \
38
- 'accounts/%{account_id}/cards/video_app_download' # @api private
39
- RESOURCE = "/#{TwitterAds::API_VERSION}/" \
40
- 'accounts/%{account_id}/cards/video_app_download/%{id}' # @api private
41
-
42
- def initialize(account)
43
- @account = account
44
- self
45
- end
46
-
47
- end
48
-
49
- end
50
- end
@@ -1,50 +0,0 @@
1
- # frozen_string_literal: true
2
- # Copyright (C) 2019 Twitter, Inc.
3
-
4
- module TwitterAds
5
- module Creative
6
-
7
- class VideoWebsiteCard
8
-
9
- include TwitterAds::DSL
10
- include TwitterAds::Resource
11
- include TwitterAds::Persistence
12
-
13
- attr_reader :account
14
-
15
- property :account_id, read_only: true
16
- property :card_type, read_only: true
17
- property :card_uri, read_only: true
18
- property :created_at, type: :time, read_only: true
19
- property :deleted, type: :bool, read_only: true
20
- property :id, read_only: true
21
- property :updated_at, type: :time, read_only: true
22
- property :video_height, read_only: true
23
- property :video_owner_id, read_only: true
24
- property :video_poster_height, read_only: true
25
- property :poster_media_url, read_only: true
26
- property :video_poster_width, read_only: true
27
- property :media_url, read_only: true
28
- property :video_width, read_only: true
29
- property :website_display_url, read_only: true
30
- property :website_dest_url, read_only: true
31
-
32
- property :name
33
- property :title
34
- property :media_key
35
- property :website_url
36
-
37
- RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/accounts/%{account_id}/cards/video_website"
38
- # @api private
39
- RESOURCE = "/#{TwitterAds::API_VERSION}/" \
40
- 'accounts/%{account_id}/cards/video_website/%{id}' # @api private
41
-
42
- def initialize(account)
43
- @account = account
44
- self
45
- end
46
-
47
- end
48
-
49
- end
50
- end
@@ -1,45 +0,0 @@
1
- # frozen_string_literal: true
2
- # Copyright (C) 2019 Twitter, Inc.
3
-
4
- module TwitterAds
5
- module Creative
6
-
7
- class WebsiteCard
8
-
9
- include TwitterAds::DSL
10
- include TwitterAds::Resource
11
- include TwitterAds::Persistence
12
-
13
- attr_reader :account
14
-
15
- property :card_type, read_only: true
16
- property :card_uri, read_only: true
17
- property :created_at, type: :time, read_only: true
18
- property :deleted, type: :bool, read_only: true
19
- property :id, read_only: true
20
- property :media_url, read_only: true
21
- property :image_display_height, read_only: true
22
- property :image_display_width, read_only: true
23
- property :updated_at, type: :time, read_only: true
24
- property :website_dest_url, read_only: true
25
- property :website_display_url, read_only: true
26
-
27
- property :media_key
28
- property :name
29
- property :website_title
30
- property :website_url
31
-
32
- RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/accounts/%{account_id}/cards/website"
33
- # @api private
34
- RESOURCE = "/#{TwitterAds::API_VERSION}/accounts/%{account_id}/cards/website/%{id}"
35
- # @api private
36
-
37
- def initialize(account)
38
- @account = account
39
- self
40
- end
41
-
42
- end
43
-
44
- end
45
- end