twitter-ads 9.0.0 → 10.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3ab4c35b2b3ff9a24fb3475717b923563c484d80b2ac7e981c18570ddbaebdbc
4
- data.tar.gz: e5f228604a745b96a063c59d80248bd976f27a4cc43243cd34a0f45a55548cb0
3
+ metadata.gz: 41647d8c40a25ad6514610875548e84017bc742bad6dff6c3838a708dce86f1a
4
+ data.tar.gz: 798fd38acef31c22a0032fa9e2ff9188c5061ec3cc04834c8503b33c8a4e2ab2
5
5
  SHA512:
6
- metadata.gz: d17c433739bebd2d74a7c62c20e58819f5f4ea29e241b3dd53ec4baeba4e55213761a27f40833d497b356638a8057770ab7a16f73578df96732555f511ddd43c
7
- data.tar.gz: 2aff371a6a36636f82adce64fa00766bcd6e5257a6c288ea58f06740df3bb879008bc1e2afe8b286c8b0b1e431ce5bf413a011562cae9e5594f65133f5d63752
6
+ metadata.gz: 1d4fffa9b3eaa288a6ef9d173fb7f6fcbb1cfd2e5286c0167be9b01f4e751179fb83d4efff294f193837c44f84a2b52a696cfa826b3e7a7ff2635696242e931b
7
+ data.tar.gz: 46f6c010335bbf314877e71decef4692fada6a9317436a38fa8bf31ad334a2742ddec724e61074ebefa23420490b2243d522360b7dce76907cd03f3d289a5a8a
data/README.md CHANGED
@@ -52,7 +52,7 @@ This project is designed to work with Ruby 2.4.0 or greater. While it may work o
52
52
 
53
53
  Platform | Versions
54
54
  -------- | --------
55
- MRI | 2.4.x, 2.5.x, 2.6.x
55
+ MRI | 2.4.x, 2.5.x, 2.6.x, 2.7, 3.0
56
56
  Rubinius | 2.4.x, 2.5.x
57
57
 
58
58
  All releases adhere to strict [semantic versioning](http://semver.org). For Example, major.minor.patch-pre (aka. stick.carrot.oops-peek).
@@ -89,7 +89,7 @@ Like the [Response](https://github.com/twitterdev/twitter-ruby-ads-sdk/blob/mast
89
89
 
90
90
  The MIT License (MIT)
91
91
 
92
- Copyright (C) 2019 Twitter, Inc.
92
+ Copyright (C) 2021 Twitter, Inc.
93
93
 
94
94
  Permission is hereby granted, free of charge, to any person obtaining a copy
95
95
  of this software and associated documentation files (the "Software"), to deal
@@ -10,7 +10,6 @@ module TwitterAds
10
10
 
11
11
  property :id, read_only: true
12
12
  property :name, read_only: true
13
- property :salt, read_only: true
14
13
  property :timezone, read_only: true
15
14
  property :timezone_switch_at, type: :time, read_only: true
16
15
  property :created_at, type: :time, read_only: true
@@ -218,6 +217,23 @@ module TwitterAds
218
217
  load_resource(LineItem, id, opts)
219
218
  end
220
219
 
220
+ # Returns a collection of tracking tags available to the
221
+ # current account.
222
+ #
223
+ # @param id [String] The LineItem ID value.
224
+ # @param opts [Hash] A Hash of extended options.
225
+ # @option opts [Boolean] :with_deleted Indicates if deleted items should be included.
226
+ # @option opts [String] :sort_by The object param to sort the API response by.
227
+ # @option opts [String] :line_item_ids The object param to sort the API response by.
228
+ # @option opts [String] :tracking_tag_ids The object param to sort the API response by.
229
+ #
230
+ # @return A Cursor or object instance.
231
+ #
232
+ # @since 10.0.0
233
+ def tracking_tags(id = nil, opts = {})
234
+ load_resource(TrackingTag, id, opts)
235
+ end
236
+
221
237
  # Returns a collection of app lists available to the current account.
222
238
  #
223
239
  # @param id [String] The AppList ID value.
@@ -23,6 +23,7 @@ module TwitterAds
23
23
  property :end_time, type: :time
24
24
  property :start_time, type: :time
25
25
  property :entity_status
26
+ property :effective_status
26
27
  property :currency
27
28
  property :standard_delivery
28
29
  property :daily_budget_amount_local_micro
@@ -19,7 +19,6 @@ module TwitterAds
19
19
  property :advertiser_domain
20
20
  property :android_app_store_identifier
21
21
  property :audience_expansion
22
- property :automatically_select_bid
23
22
  property :bid_amount_local_micro
24
23
  property :bid_strategy
25
24
  property :campaign_id
@@ -39,7 +38,6 @@ module TwitterAds
39
38
 
40
39
  # beta (not yet generally available)
41
40
  property :advertiser_user_id
42
- property :tracking_tags
43
41
 
44
42
  # sdk only
45
43
  property :to_delete, type: :bool
@@ -94,5 +92,8 @@ module TwitterAds
94
92
  id ? TargetingCriteria.load(account, id, opts) : TargetingCriteria.all(account, @id, opts)
95
93
  end
96
94
 
95
+ def tracking_tags(id = nil, opts = {})
96
+ id ? TrackingTag.load(account, id, opts) : TrackingTag.all(account, @id, opts)
97
+ end
97
98
  end
98
99
  end
@@ -0,0 +1,97 @@
1
+ # frozen_string_literal: true
2
+ # Copyright (C) 2019 Twitter, Inc.
3
+
4
+ module TwitterAds
5
+ class TrackingTag
6
+
7
+ include TwitterAds::DSL
8
+ include TwitterAds::Resource
9
+ include TwitterAds::Persistence
10
+
11
+ attr_reader :account
12
+
13
+ property :id, read_only: true
14
+ property :deleted, type: :bool, read_only: true
15
+ property :created_at, type: :time, read_only: true
16
+ property :updated_at, type: :time, read_only: true
17
+
18
+ property :line_item_id
19
+ property :tracking_tag_type
20
+ property :tracking_tag_url
21
+
22
+ # sdk only
23
+ property :to_delete, type: :bool
24
+
25
+ RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" \
26
+ 'accounts/%{account_id}/tracking_tags' # @api private
27
+ RESOURCE = "/#{TwitterAds::API_VERSION}/" \
28
+ 'accounts/%{account_id}/tracking_tags/%{id}' # @api private
29
+
30
+ def initialize(account)
31
+ @account = account
32
+ self
33
+ end
34
+
35
+ # Creates a new Tracking Tag
36
+ #
37
+ # @param line_item_id [String] The line item id to create tags for.
38
+ # @param tracking_tag_url [String] tracking tag URL.
39
+ #
40
+ # @return [self] Returns the instance refreshed from the API
41
+ def create(line_item_id, tracking_tag_url)
42
+ resource = self.class::RESOURCE_COLLECTION % { account_id: account.id }
43
+ params = to_params.merge!(
44
+ line_item_id: line_item_id,
45
+ tracking_tag_url: tracking_tag_url,
46
+ tracking_tag_type: 'IMPRESSION_TAG'
47
+ )
48
+ response = Request.new(account.client, :post, resource, params: params).perform
49
+ from_response(response.body[:data])
50
+ end
51
+
52
+ class << self
53
+
54
+ # Returns a Cursor instance for a given resource.
55
+ #
56
+ # @param account [Account] The Account object instance.
57
+ # @param line_item_ids [String] A String or String array of Line Item IDs.
58
+ # @param opts [Hash] An optional Hash of extended options.
59
+ # @option opts [Boolean] :with_deleted Indicates if deleted items should be included.
60
+ # @option opts [String] :sort_by The object param to sort the API response by.
61
+ #
62
+ # @return [Cursor] A Cusor object ready to iterate through the API response.
63
+ #
64
+ # @since 0.3.1
65
+ # @see Cursor
66
+ # @see https://dev.twitter.com/ads/basics/sorting Sorting
67
+ def all(account, line_item_ids, opts = {})
68
+ if !line_item_ids.empty?
69
+ params = { line_item_ids: Array(line_item_ids).join(',') }.merge!(opts)
70
+ end
71
+ resource = RESOURCE_COLLECTION % { account_id: account.id }
72
+ request = Request.new(account.client, :get, resource, params: params)
73
+ Cursor.new(self, request, init_with: [account])
74
+ end
75
+
76
+ # Returns an object instance for a given resource.
77
+ #
78
+ # @param account [Account] The Account object instance.
79
+ # @param id [String] The ID of the specific object to be loaded.
80
+ # @param opts [Hash] An optional Hash of extended options.
81
+ # @option opts [Boolean] :with_deleted Indicates if deleted items should be included.
82
+ # @option opts [String] :sort_by The object param to sort the API response by.
83
+ #
84
+ # @return [self] The object instance for the specified resource.
85
+ #
86
+ # @since 0.3.1
87
+ def load(account, id, opts = {})
88
+ params = { with_deleted: true }.merge!(opts)
89
+ resource = RESOURCE % { account_id: account.id, id: id }
90
+ response = Request.new(account.client, :get, resource, params: params).perform
91
+ new(account).from_response(response.body[:data])
92
+ end
93
+
94
+ end
95
+
96
+ end
97
+ end
@@ -3,7 +3,7 @@
3
3
 
4
4
  module TwitterAds
5
5
 
6
- API_VERSION = '9'
6
+ API_VERSION = '10'
7
7
 
8
8
  # The Ads API Client class which functions as a
9
9
  # container for basic API consumer information.
@@ -35,10 +35,8 @@ module TwitterAds
35
35
  property :image, read_only: true
36
36
  property :image_display_height, read_only: true
37
37
  property :image_display_width, read_only: true
38
- property :ipad_app_id, read_only: true
39
- property :ipad_deep_link, read_only: true
40
- property :iphone_app_id, read_only: true
41
- property :iphone_deep_link, read_only: true
38
+ property :ios_app_store_identifier, read_only: true
39
+ property :ios_deep_link, read_only: true
42
40
  property :name, read_only: true
43
41
  property :recipient_user_id, read_only: true
44
42
  property :second_choice, read_only: true
@@ -26,10 +26,8 @@ module TwitterAds
26
26
  property :app_cta
27
27
  property :googleplay_app_id
28
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
29
+ property :ios_app_store_identifier
30
+ property :ios_deep_link
33
31
  property :name
34
32
  property :media_key
35
33
 
@@ -25,10 +25,8 @@ module TwitterAds
25
25
  property :country_code
26
26
  property :app_cta
27
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
28
+ property :ios_app_store_identifier
29
+ property :ios_deep_link
32
30
  property :googleplay_app_id
33
31
  property :googleplay_deep_link
34
32
  property :name
@@ -56,13 +56,13 @@ module TwitterAds
56
56
  # @return [Cursor] The current Cursor instance.
57
57
  #
58
58
  # @since 0.1.0
59
- def each(offset = 0)
59
+ def each(offset = 0, &block)
60
60
  return to_enum(:each, offset) unless block_given?
61
61
  @collection[offset..-1].each { |element| yield(element) }
62
62
  unless exhausted?
63
63
  offset = [@collection.size, offset].max
64
64
  fetch_next
65
- each(offset, &Proc.new)
65
+ each(offset, &block)
66
66
  end
67
67
  self
68
68
  end
@@ -84,6 +84,7 @@ module TwitterAds
84
84
 
85
85
  module PayBy
86
86
  APP_CLICK = 'APP_CLICK'
87
+ IMPRESSION = 'IMPRESSION'
87
88
  end
88
89
 
89
90
  module MetricGroup
@@ -211,7 +211,7 @@ module TwitterAds
211
211
  tries = 0
212
212
  begin
213
213
  tries += 1
214
- raw_file = open(data_url)
214
+ raw_file = URI.open(data_url)
215
215
  unzipped_file = Zlib::GzipReader.new(raw_file)
216
216
  response_data = unzipped_file.read
217
217
  response = JSON.parse(response_data)
@@ -2,13 +2,13 @@
2
2
  # Copyright (C) 2019 Twitter, Inc.
3
3
 
4
4
  module TwitterAds
5
- module AudienceSummary
5
+ module AudienceEstimate
6
6
 
7
7
  include TwitterAds::DSL
8
8
  include TwitterAds::Resource
9
9
 
10
10
  RESOURCE = "/#{TwitterAds::API_VERSION}/" \
11
- 'accounts/%{account_id}/audience_summary'
11
+ 'accounts/%{account_id}/audience_estimate'
12
12
 
13
13
  property :audience_size, read_only: true
14
14
 
@@ -17,7 +17,7 @@ module TwitterAds
17
17
  # Get an audience summary for the specified targeting criteria.
18
18
  #
19
19
  # @example
20
- # TwitterAds::AudienceSummary.fetch(
20
+ # TwitterAds::AudienceEstimate.fetch(
21
21
  # account,
22
22
  # params: {targeting_criteria:[{targeting_type:'LOCATION',
23
23
  # targeting_value:'96683cc9126741d1'}]}
@@ -2,5 +2,5 @@
2
2
  # Copyright (C) 2019 Twitter, Inc.
3
3
 
4
4
  module TwitterAds
5
- VERSION = '9.0.0'
5
+ VERSION = '10.1.0'
6
6
  end
data/lib/twitter-ads.rb CHANGED
@@ -37,6 +37,7 @@ require 'twitter-ads/campaign/funding_instrument'
37
37
  require 'twitter-ads/campaign/line_item'
38
38
  require 'twitter-ads/campaign/promotable_user'
39
39
  require 'twitter-ads/campaign/targeting_criteria'
40
+ require 'twitter-ads/campaign/tracking_tags'
40
41
  require 'twitter-ads/campaign/tweet'
41
42
  require 'twitter-ads/campaign/organic_tweet'
42
43
  require 'twitter-ads/campaign/iab_category'
@@ -75,7 +76,7 @@ require 'twitter-ads/creative/poll_cards'
75
76
  require 'twitter-ads/creative/tweet_previews'
76
77
  require 'twitter-ads/creative/tweets'
77
78
 
78
- require 'twitter-ads/targeting/audience_summary'
79
+ require 'twitter-ads/targeting/audience_estimate'
79
80
 
80
81
  require 'twitter-ads/measurement/web_event_tag'
81
82
  require 'twitter-ads/measurement/app_event_tag'
@@ -9,7 +9,6 @@
9
9
  "timezone_switch_at": "2014-11-17T08:00:00Z",
10
10
  "id": "2iqph",
11
11
  "created_at": "2015-03-04T10:50:42Z",
12
- "salt": "5ab2pizq7qxjjqrx3z67f4wbko61o7xs",
13
12
  "updated_at": "2015-04-11T05:20:08Z",
14
13
  "approval_status": "ACCEPTED",
15
14
  "deleted": false
@@ -20,7 +19,6 @@
20
19
  "timezone_switch_at": "2014-11-17T08:00:00Z",
21
20
  "id": "pz6ec",
22
21
  "created_at": "2015-05-29T00:52:16Z",
23
- "salt": "39ku32xvhdt0jax8thps2c70e2fv3yok",
24
22
  "updated_at": "2015-05-29T00:52:16Z",
25
23
  "approval_status": "ACCEPTED",
26
24
  "deleted": false
@@ -31,7 +29,6 @@
31
29
  "timezone_switch_at": "2014-11-17T08:00:00Z",
32
30
  "id": "j9ozo",
33
31
  "created_at": "2015-05-01T12:08:10Z",
34
- "salt": "winwfne3y6oyikl4tm84bj9r50waxj37",
35
32
  "updated_at": "2015-05-01T12:08:10Z",
36
33
  "approval_status": "ACCEPTED",
37
34
  "deleted": false
@@ -42,7 +39,6 @@
42
39
  "timezone_switch_at": "2014-11-17T08:00:00Z",
43
40
  "id": "9ttgd",
44
41
  "created_at": "2015-06-24T18:51:20Z",
45
- "salt": "tj9hmt5xylm5zztrq05w7hwh4mkpkg5r",
46
42
  "updated_at": "2015-06-26T06:13:24Z",
47
43
  "approval_status": "ACCEPTED",
48
44
  "deleted": false
@@ -53,7 +49,6 @@
53
49
  "timezone_switch_at": "2013-05-22T07:00:00Z",
54
50
  "id": "47d0v",
55
51
  "created_at": "2015-05-28T05:42:03Z",
56
- "salt": "1ms1mq1nww7zl7169865gwqt89s9127m",
57
52
  "updated_at": "2015-05-28T05:42:03Z",
58
53
  "approval_status": "ACCEPTED",
59
54
  "deleted": false
@@ -6,7 +6,6 @@
6
6
  "timezone_switch_at": "2014-11-17T08:00:00Z",
7
7
  "id": "2iqph",
8
8
  "created_at": "2015-03-04T10:50:42Z",
9
- "salt": "5ab2pizq7qxjjqrx3z67f4wbko61o7xs",
10
9
  "updated_at": "2015-04-11T05:20:08Z",
11
10
  "approval_status": "ACCEPTED",
12
11
  "deleted": false
@@ -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,7 +40,6 @@ 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
@@ -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
@@ -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: 10.1.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-01-07 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: multi_json
@@ -68,6 +68,7 @@ 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
@@ -104,7 +105,7 @@ files:
104
105
  - lib/twitter-ads/restapi.rb
105
106
  - lib/twitter-ads/settings/tax.rb
106
107
  - lib/twitter-ads/settings/user.rb
107
- - lib/twitter-ads/targeting/audience_summary.rb
108
+ - lib/twitter-ads/targeting/audience_estimate.rb
108
109
  - lib/twitter-ads/targeting_criteria/app_store_category.rb
109
110
  - lib/twitter-ads/targeting_criteria/conversation.rb
110
111
  - lib/twitter-ads/targeting_criteria/device.rb
@@ -124,7 +125,7 @@ files:
124
125
  - spec/fixtures/accounts_load.json
125
126
  - spec/fixtures/app_lists_all.json
126
127
  - spec/fixtures/app_lists_load.json
127
- - spec/fixtures/audience_summary.json
128
+ - spec/fixtures/audience_estimate.json
128
129
  - spec/fixtures/campaigns_all.json
129
130
  - spec/fixtures/campaigns_load.json
130
131
  - spec/fixtures/custom_audiences_all.json
@@ -142,6 +143,7 @@ files:
142
143
  - spec/fixtures/reach_estimate.json
143
144
  - spec/fixtures/tailored_audiences_all.json
144
145
  - spec/fixtures/targeted_audiences.json
146
+ - spec/fixtures/tracking_tags_load.json
145
147
  - spec/fixtures/tweet_previews.json
146
148
  - spec/fixtures/videos_all.json
147
149
  - spec/fixtures/videos_load.json
@@ -154,6 +156,7 @@ files:
154
156
  - spec/twitter-ads/campaign/app_list_spec.rb
155
157
  - spec/twitter-ads/campaign/line_item_spec.rb
156
158
  - spec/twitter-ads/campaign/targeting_criteria_spec.rb
159
+ - spec/twitter-ads/campaign/tracking_tag_spec.rb
157
160
  - spec/twitter-ads/campaign/tweet_spec.rb
158
161
  - spec/twitter-ads/client_spec.rb
159
162
  - spec/twitter-ads/creative/media_creative_spec.rb
@@ -164,7 +167,7 @@ files:
164
167
  - spec/twitter-ads/placements_spec.rb
165
168
  - spec/twitter-ads/rate_limit_spec.rb
166
169
  - spec/twitter-ads/retry_count_spec.rb
167
- - spec/twitter-ads/targeting/audience_summary_spec.rb
170
+ - spec/twitter-ads/targeting/audience_estimate_spec.rb
168
171
  - spec/twitter-ads/utils_spec.rb
169
172
  - twitter-ads.gemspec
170
173
  homepage: https://github.com/twitterdev/twitter-ruby-ads-sdk
@@ -186,55 +189,57 @@ required_rubygems_version: !ruby/object:Gem::Requirement
186
189
  - !ruby/object:Gem::Version
187
190
  version: 2.6.0
188
191
  requirements: []
189
- rubygems_version: 3.2.22
192
+ rubygems_version: 3.1.6
190
193
  signing_key:
191
194
  specification_version: 4
192
195
  summary: The officially supported Twitter Ads API SDK for Ruby.
193
196
  test_files:
194
- - spec/fixtures/accounts_all.json
197
+ - spec/shared/properties.rb
198
+ - spec/spec_helper.rb
199
+ - spec/quality_spec.rb
200
+ - spec/twitter-ads/campaign/tracking_tag_spec.rb
201
+ - spec/twitter-ads/campaign/tweet_spec.rb
202
+ - spec/twitter-ads/campaign/targeting_criteria_spec.rb
203
+ - spec/twitter-ads/campaign/line_item_spec.rb
204
+ - spec/twitter-ads/campaign/app_list_spec.rb
205
+ - spec/twitter-ads/rate_limit_spec.rb
206
+ - spec/twitter-ads/targeting/audience_estimate_spec.rb
207
+ - spec/twitter-ads/creative/promoted_account_spec.rb
208
+ - spec/twitter-ads/creative/tweet_previews_spec.rb
209
+ - spec/twitter-ads/creative/media_creative_spec.rb
210
+ - spec/twitter-ads/creative/promoted_tweet_spec.rb
211
+ - spec/twitter-ads/utils_spec.rb
212
+ - spec/twitter-ads/placements_spec.rb
213
+ - spec/twitter-ads/retry_count_spec.rb
214
+ - spec/twitter-ads/client_spec.rb
215
+ - spec/twitter-ads/account_spec.rb
216
+ - spec/twitter-ads/audiences/custom_audience_spec.rb
217
+ - spec/twitter-ads/cursor_spec.rb
218
+ - spec/fixtures/line_items_load.json
219
+ - spec/fixtures/promotable_users_all.json
220
+ - spec/fixtures/campaigns_load.json
195
221
  - spec/fixtures/accounts_features.json
196
- - spec/fixtures/accounts_load.json
197
- - spec/fixtures/app_lists_all.json
198
222
  - spec/fixtures/app_lists_load.json
199
- - spec/fixtures/audience_summary.json
200
- - 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
205
- - spec/fixtures/funding_instruments_load.json
206
- - spec/fixtures/line_items_all.json
207
- - spec/fixtures/line_items_load.json
223
+ - spec/fixtures/accounts_load.json
208
224
  - spec/fixtures/no_content.json
209
- - spec/fixtures/placements.json
210
- - spec/fixtures/promotable_users_all.json
211
- - spec/fixtures/promotable_users_load.json
225
+ - spec/fixtures/audience_estimate.json
212
226
  - spec/fixtures/promoted_tweets_all.json
213
- - spec/fixtures/promoted_tweets_load.json
214
- - spec/fixtures/reach_estimate.json
215
- - spec/fixtures/tailored_audiences_all.json
227
+ - spec/fixtures/placements.json
228
+ - spec/fixtures/tracking_tags_load.json
229
+ - spec/fixtures/funding_instruments_load.json
216
230
  - spec/fixtures/targeted_audiences.json
217
- - spec/fixtures/tweet_previews.json
231
+ - spec/fixtures/reach_estimate.json
232
+ - spec/fixtures/line_items_all.json
233
+ - spec/fixtures/promoted_tweets_load.json
218
234
  - spec/fixtures/videos_all.json
235
+ - spec/fixtures/app_lists_all.json
219
236
  - spec/fixtures/videos_load.json
220
- - spec/quality_spec.rb
221
- - spec/shared/properties.rb
222
- - spec/spec_helper.rb
237
+ - spec/fixtures/promotable_users_load.json
238
+ - spec/fixtures/accounts_all.json
239
+ - spec/fixtures/tweet_previews.json
240
+ - spec/fixtures/custom_audiences_all.json
241
+ - spec/fixtures/funding_instruments_all.json
242
+ - spec/fixtures/campaigns_all.json
243
+ - spec/fixtures/custom_audiences_load.json
244
+ - spec/fixtures/tailored_audiences_all.json
223
245
  - spec/support/helpers.rb
224
- - 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
228
- - spec/twitter-ads/campaign/targeting_criteria_spec.rb
229
- - spec/twitter-ads/campaign/tweet_spec.rb
230
- - spec/twitter-ads/client_spec.rb
231
- - spec/twitter-ads/creative/media_creative_spec.rb
232
- - spec/twitter-ads/creative/promoted_account_spec.rb
233
- - spec/twitter-ads/creative/promoted_tweet_spec.rb
234
- - spec/twitter-ads/creative/tweet_previews_spec.rb
235
- - spec/twitter-ads/cursor_spec.rb
236
- - spec/twitter-ads/placements_spec.rb
237
- - 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