twitter-ads 5.0.0 → 5.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. checksums.yaml +5 -5
  2. data/LICENSE +1 -1
  3. data/README.md +3 -4
  4. data/Rakefile +1 -2
  5. data/lib/twitter-ads.rb +10 -11
  6. data/lib/twitter-ads/account.rb +12 -12
  7. data/lib/twitter-ads/audiences/audience_intelligence.rb +3 -3
  8. data/lib/twitter-ads/audiences/tailored_audience.rb +12 -156
  9. data/lib/twitter-ads/campaign/app_list.rb +5 -5
  10. data/lib/twitter-ads/campaign/campaign.rb +7 -11
  11. data/lib/twitter-ads/campaign/funding_instrument.rb +6 -5
  12. data/lib/twitter-ads/campaign/iab_category.rb +2 -2
  13. data/lib/twitter-ads/campaign/line_item.rb +18 -21
  14. data/lib/twitter-ads/campaign/organic_tweet.rb +1 -5
  15. data/lib/twitter-ads/campaign/promotable_user.rb +5 -5
  16. data/lib/twitter-ads/campaign/targeting_criteria.rb +7 -7
  17. data/lib/twitter-ads/campaign/tweet.rb +7 -11
  18. data/lib/twitter-ads/client.rb +3 -4
  19. data/lib/twitter-ads/creative/account_media.rb +5 -5
  20. data/lib/twitter-ads/creative/cards_fetch.rb +8 -6
  21. data/lib/twitter-ads/creative/image_app_download_card.rb +5 -5
  22. data/lib/twitter-ads/creative/image_conversation_card.rb +5 -5
  23. data/lib/twitter-ads/creative/media_creative.rb +6 -5
  24. data/lib/twitter-ads/creative/media_library.rb +5 -5
  25. data/lib/twitter-ads/creative/poll_cards.rb +5 -5
  26. data/lib/twitter-ads/creative/promoted_account.rb +5 -9
  27. data/lib/twitter-ads/creative/promoted_tweet.rb +5 -9
  28. data/lib/twitter-ads/creative/scheduled_tweet.rb +7 -7
  29. data/lib/twitter-ads/creative/tweet_previews.rb +36 -0
  30. data/lib/twitter-ads/creative/video_app_download_card.rb +5 -5
  31. data/lib/twitter-ads/creative/video_conversation_card.rb +5 -5
  32. data/lib/twitter-ads/creative/video_website_card.rb +4 -4
  33. data/lib/twitter-ads/creative/website_card.rb +3 -3
  34. data/lib/twitter-ads/cursor.rb +2 -2
  35. data/lib/twitter-ads/enum.rb +128 -122
  36. data/lib/twitter-ads/error.rb +2 -2
  37. data/lib/twitter-ads/http/request.rb +6 -5
  38. data/lib/twitter-ads/http/response.rb +1 -1
  39. data/lib/twitter-ads/legacy.rb +1 -1
  40. data/lib/twitter-ads/measurement/app_event_tag.rb +3 -3
  41. data/lib/twitter-ads/measurement/web_event_tag.rb +3 -3
  42. data/lib/twitter-ads/resources/analytics.rb +38 -8
  43. data/lib/twitter-ads/resources/batch.rb +4 -4
  44. data/lib/twitter-ads/resources/dsl.rb +1 -1
  45. data/lib/twitter-ads/resources/persistence.rb +1 -1
  46. data/lib/twitter-ads/resources/resource.rb +2 -2
  47. data/lib/twitter-ads/settings/tax.rb +3 -3
  48. data/lib/twitter-ads/settings/user.rb +3 -3
  49. data/lib/twitter-ads/targeting/reach_estimate.rb +1 -1
  50. data/lib/twitter-ads/targeting_criteria/app_store_category.rb +3 -3
  51. data/lib/twitter-ads/targeting_criteria/behavior.rb +3 -3
  52. data/lib/twitter-ads/targeting_criteria/behavior_taxonomy.rb +3 -3
  53. data/lib/twitter-ads/targeting_criteria/device.rb +3 -3
  54. data/lib/twitter-ads/targeting_criteria/event.rb +3 -3
  55. data/lib/twitter-ads/targeting_criteria/interest.rb +3 -3
  56. data/lib/twitter-ads/targeting_criteria/language.rb +3 -3
  57. data/lib/twitter-ads/targeting_criteria/location.rb +3 -3
  58. data/lib/twitter-ads/targeting_criteria/network_operator.rb +3 -3
  59. data/lib/twitter-ads/targeting_criteria/platform.rb +3 -3
  60. data/lib/twitter-ads/targeting_criteria/platform_version.rb +3 -3
  61. data/lib/twitter-ads/targeting_criteria/tv_market.rb +3 -3
  62. data/lib/twitter-ads/targeting_criteria/tv_show.rb +3 -3
  63. data/lib/twitter-ads/utils.rb +2 -2
  64. data/lib/twitter-ads/version.rb +2 -2
  65. data/spec/quality_spec.rb +2 -2
  66. data/spec/shared/properties.rb +1 -1
  67. data/spec/spec_helper.rb +9 -8
  68. data/spec/support/helpers.rb +1 -1
  69. data/spec/twitter-ads/account_spec.rb +1 -1
  70. data/spec/twitter-ads/audiences/tailored_audience_spec.rb +1 -1
  71. data/spec/twitter-ads/campaign/app_list_spec.rb +1 -1
  72. data/spec/twitter-ads/campaign/line_item_spec.rb +1 -1
  73. data/spec/twitter-ads/campaign/reach_estimate_spec.rb +1 -1
  74. data/spec/twitter-ads/campaign/targeting_criteria_spec.rb +1 -1
  75. data/spec/twitter-ads/campaign/tweet_spec.rb +1 -1
  76. data/spec/twitter-ads/client_spec.rb +1 -1
  77. data/spec/twitter-ads/creative/account_media_spec.rb +1 -1
  78. data/spec/twitter-ads/creative/image_app_download_card_spec.rb +1 -1
  79. data/spec/twitter-ads/creative/image_conversation_card_spec.rb +1 -1
  80. data/spec/twitter-ads/creative/media_creative_spec.rb +1 -1
  81. data/spec/twitter-ads/creative/promoted_account_spec.rb +1 -1
  82. data/spec/twitter-ads/creative/promoted_tweet_spec.rb +1 -1
  83. data/spec/twitter-ads/creative/video_app_download_card_spec.rb +1 -1
  84. data/spec/twitter-ads/creative/video_conversation_card_spec.rb +1 -1
  85. data/spec/twitter-ads/creative/website_card_spec.rb +1 -1
  86. data/spec/twitter-ads/cursor_spec.rb +1 -1
  87. data/spec/twitter-ads/placements_spec.rb +1 -1
  88. data/spec/twitter-ads/utils_spec.rb +1 -1
  89. data/twitter-ads.gemspec +10 -6
  90. metadata +10 -25
  91. data/lib/twitter-ads/http/ton_upload.rb +0 -156
  92. data/spec/twitter-ads/http/ton_upload_spec.rb +0 -96
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
- # Copyright (C) 2015 Twitter, Inc.
2
+ # Copyright (C) 2019 Twitter, Inc.
3
3
 
4
4
  module TwitterAds
5
5
 
@@ -21,7 +21,7 @@ module TwitterAds
21
21
  end
22
22
 
23
23
  def inspect
24
- str = String.new("#<#{self.class.name}:0x#{object_id}")
24
+ str = +"#<#{self.class.name}:0x#{object_id}"
25
25
  str << " code=#{@code}" if @code
26
26
  str << " details=\"#{@details}\"" if @details
27
27
  str << '>'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
- # Copyright (C) 2015 Twitter, Inc.
2
+ # Copyright (C) 2019 Twitter, Inc.
3
3
 
4
4
  module TwitterAds
5
5
 
@@ -15,8 +15,8 @@ module TwitterAds
15
15
  delete: Net::HTTP::Delete
16
16
  }.freeze
17
17
 
18
- DEFAULT_DOMAIN = 'https://ads-api.twitter.com'.freeze
19
- SANDBOX_DOMAIN = 'https://ads-api-sandbox.twitter.com'.freeze
18
+ DEFAULT_DOMAIN = 'https://ads-api.twitter.com'
19
+ SANDBOX_DOMAIN = 'https://ads-api-sandbox.twitter.com'
20
20
 
21
21
  private_constant :DEFAULT_DOMAIN, :SANDBOX_DOMAIN, :HTTP_METHOD
22
22
 
@@ -80,6 +80,7 @@ module TwitterAds
80
80
 
81
81
  def http_request
82
82
  request_url = @resource
83
+
83
84
  if @options[:params] && !@options[:params].empty?
84
85
  request_url += "?#{URI.encode_www_form(@options[:params])}"
85
86
  end
@@ -87,7 +88,7 @@ module TwitterAds
87
88
  request = HTTP_METHOD[@method].new(request_url)
88
89
  request.body = @options[:body] if @options[:body]
89
90
 
90
- @options[:headers].each { |header, value| request[header] = value } if @options[:headers]
91
+ @options[:headers]&.each { |header, value| request[header] = value }
91
92
  request['user-agent'] = user_agent
92
93
 
93
94
  request
@@ -108,7 +109,7 @@ module TwitterAds
108
109
  object.each { |header| @client.logger.info("Header: #{header}: #{object[header]}") }
109
110
 
110
111
  # suppresses body content for non-Ads API domains (eg. upload.twitter.com)
111
- if object.body && !object.body.empty?
112
+ unless object.body&.empty?
112
113
  if @domain == SANDBOX_DOMAIN || @domain == DEFAULT_DOMAIN
113
114
  @client.logger.info("Body: #{object.body}")
114
115
  else
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
- # Copyright (C) 2015 Twitter, Inc.
2
+ # Copyright (C) 2019 Twitter, Inc.
3
3
 
4
4
  module TwitterAds
5
5
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
- # Copyright (C) 2015 Twitter, Inc.
2
+ # Copyright (C) 2019 Twitter, Inc.
3
3
 
4
4
  # legacy namespace support, to be removed in v1.0.0 (next major)
5
5
  TwitterAds::Objective = TwitterAds::Enum::Objective
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
- # Copyright (C) 2015 Twitter, Inc.
2
+ # Copyright (C) 2019 Twitter, Inc.
3
3
 
4
4
  module TwitterAds
5
5
  class AppEventTag
@@ -19,8 +19,8 @@ module TwitterAds
19
19
  property :post_view_attribution_window
20
20
  property :post_engagement_attribution_window
21
21
 
22
- RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" +
23
- 'accounts/%{account_id}/app_event_tags'.freeze # @api private
22
+ RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" \
23
+ 'accounts/%{account_id}/app_event_tags' # @api private
24
24
 
25
25
  def initialize(account)
26
26
  @account = account
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
- # Copyright (C) 2015 Twitter, Inc.
2
+ # Copyright (C) 2019 Twitter, Inc.
3
3
 
4
4
  module TwitterAds
5
5
  class WebEventTag
@@ -18,8 +18,8 @@ module TwitterAds
18
18
  property :embed_code, read_only: true
19
19
  property :click_window
20
20
 
21
- RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" +
22
- 'accounts/%{account_id}/web_event_tags'.freeze # @api private
21
+ RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" \
22
+ 'accounts/%{account_id}/web_event_tags' # @api private
23
23
 
24
24
  def initialize(account)
25
25
  @account = account
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
- # Copyright (C) 2015 Twitter, Inc.
2
+ # Copyright (C) 2019 Twitter, Inc.
3
3
 
4
4
  require 'zlib'
5
5
  require 'open-uri'
@@ -7,14 +7,24 @@ require 'open-uri'
7
7
  module TwitterAds
8
8
  module Analytics
9
9
 
10
+ include TwitterAds::Enum
11
+
10
12
  ANALYTICS_MAP = {
11
- 'TwitterAds::Campaign' => 'CAMPAIGN'.freeze,
12
- 'TwitterAds::LineItem' => 'LINE_ITEM'.freeze,
13
- 'TwitterAds::OrganicTweet' => 'ORGANIC_TWEET'.freeze,
14
- 'TwitterAds::Creative::PromotedAccount' => 'ACCOUNT'.freeze,
15
- 'TwitterAds::Creative::PromotedTweet' => 'PROMOTED_TWEET'.freeze
13
+ 'TwitterAds::Campaign' => Entity::CAMPAIGN,
14
+ 'TwitterAds::LineItem' => Entity::LINE_ITEM,
15
+ 'TwitterAds::OrganicTweet' => Entity::ORGANIC_TWEET,
16
+ 'TwitterAds::Creative::PromotedAccount' => Entity::ACCOUNT,
17
+ 'TwitterAds::Creative::PromotedTweet' => Entity::PROMOTED_TWEET,
18
+ 'TwitterAds::Creative::MediaCreative' => Entity::MEDIA_CREATIVE
16
19
  }.freeze
17
20
 
21
+ RESOURCE_STATS = "/#{TwitterAds::API_VERSION}/" +
22
+ 'stats/accounts/%{account_id}' # @api private
23
+ RESOURCE_ASYNC_STATS = "/#{TwitterAds::API_VERSION}/" +
24
+ 'stats/jobs/accounts/%{account_id}' # @api private
25
+ RESOURCE_ACTIVE_ENTITIES = "/#{TwitterAds::API_VERSION}/" +
26
+ 'stats/accounts/%{account_id}/active_entities' # @api private
27
+
18
28
  def self.included(klass)
19
29
  klass.send :include, InstanceMethods
20
30
  klass.extend ClassMethods
@@ -70,7 +80,7 @@ module TwitterAds
70
80
  def stats(account, ids, metric_groups, opts = {})
71
81
  # set default metric values
72
82
  end_time = opts.fetch(:end_time, (Time.now - Time.now.sec - (60 * Time.now.min)))
73
- start_time = opts.fetch(:start_time, end_time - 604_800) # 7 days ago
83
+ start_time = opts.fetch(:start_time, end_time - (60 * 60 * 24 * 7)) # 7 days ago
74
84
  granularity = opts.fetch(:granularity, :hour)
75
85
  start_utc_offset = opts[:start_utc_offset] || opts[:utc_offset]
76
86
  end_utc_offset = opts[:end_utc_offset] || opts[:utc_offset]
@@ -199,7 +209,27 @@ module TwitterAds
199
209
  end
200
210
  end
201
211
 
202
- end
212
+ def active_entities(account, start_time:, end_time:, **opts)
213
+ entity_type = name
214
+ granularity = opts.fetch(:granularity, nil)
215
+ start_utc_offset = opts[:start_utc_offset] || opts[:utc_offset]
216
+ end_utc_offset = opts[:end_utc_offset] || opts[:utc_offset]
217
+
218
+ if entity_type == 'OrganicTweet'
219
+ raise "'OrganicTweet' not support with 'active_entities'"
220
+ end
203
221
 
222
+ params = {
223
+ entity: ANALYTICS_MAP[entity_type],
224
+ start_time: TwitterAds::Utils.to_time(start_time, granularity, start_utc_offset),
225
+ end_time: TwitterAds::Utils.to_time(end_time, granularity, end_utc_offset)
226
+ }.merge!(opts)
227
+
228
+ resource = self::RESOURCE_ACTIVE_ENTITIES % { account_id: account.id }
229
+ response = Request.new(account.client, :get, resource, params: params).perform
230
+ response.body[:data]
231
+ end
232
+
233
+ end
204
234
  end
205
235
  end
@@ -1,13 +1,13 @@
1
1
  # frozen_string_literal: true
2
- # Copyright (C) 2015 Twitter, Inc.
2
+ # Copyright (C) 2019 Twitter, Inc.
3
3
 
4
4
  module TwitterAds
5
5
  module Batch
6
6
 
7
7
  CLASS_ID_MAP = {
8
- 'TwitterAds::LineItem' => 'LINE_ITEM'.freeze,
9
- 'TwitterAds::Campaign' => 'CAMPAIGN'.freeze,
10
- 'TwitterAds::TargetingCriteria' => 'TARGETING_CRITERION'.freeze
8
+ 'TwitterAds::LineItem' => 'LINE_ITEM',
9
+ 'TwitterAds::Campaign' => 'CAMPAIGN',
10
+ 'TwitterAds::TargetingCriteria' => 'TARGETING_CRITERION'
11
11
  }.freeze # @api private
12
12
 
13
13
  def self.included(klass)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
- # Copyright (C) 2015 Twitter, Inc.
2
+ # Copyright (C) 2019 Twitter, Inc.
3
3
 
4
4
  module TwitterAds
5
5
  # A light-wight DSL for building out Twitter Ads API resources.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
- # Copyright (C) 2015 Twitter, Inc.
2
+ # Copyright (C) 2019 Twitter, Inc.
3
3
 
4
4
  module TwitterAds
5
5
  module Persistence
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
- # Copyright (C) 2015 Twitter, Inc.
2
+ # Copyright (C) 2019 Twitter, Inc.
3
3
 
4
4
  module TwitterAds
5
5
  module Resource
@@ -40,7 +40,7 @@ module TwitterAds
40
40
  #
41
41
  # @since 0.1.0
42
42
  def inspect
43
- str = String.new("#<#{self.class.name}:0x#{object_id}")
43
+ str = +"#<#{self.class.name}:0x#{object_id}"
44
44
  str << " id=\"#{@id}\"" if @id
45
45
  str << ' deleted="true"' if @deleted
46
46
  str << '>'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
- # Copyright (C) 2015 Twitter, Inc.
2
+ # Copyright (C) 2019 Twitter, Inc.
3
3
 
4
4
  module TwitterAds
5
5
  class TaxSettings
@@ -40,8 +40,8 @@ module TwitterAds
40
40
  # sdk only
41
41
  property :to_delete, type: :bool
42
42
 
43
- RESOURCE = "/#{TwitterAds::API_VERSION}/" +
44
- 'accounts/%{account_id}/user_settings/%{id}'.freeze # @api private
43
+ RESOURCE = "/#{TwitterAds::API_VERSION}/" \
44
+ 'accounts/%{account_id}/user_settings/%{id}' # @api private
45
45
 
46
46
  def initialize(account)
47
47
  @account = account
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
- # Copyright (C) 2015 Twitter, Inc.
2
+ # Copyright (C) 2019 Twitter, Inc.
3
3
 
4
4
  module TwitterAds
5
5
  class UserSettings
@@ -19,8 +19,8 @@ module TwitterAds
19
19
  # sdk only
20
20
  property :to_delete, type: :bool
21
21
 
22
- RESOURCE = "/#{TwitterAds::API_VERSION}/" +
23
- 'accounts/%{account_id}/user_settings/%{id}'.freeze # @api private
22
+ RESOURCE = "/#{TwitterAds::API_VERSION}/" \
23
+ 'accounts/%{account_id}/user_settings/%{id}' # @api private
24
24
 
25
25
  def initialize(account)
26
26
  @account = account
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
- # Copyright (C) 2015 Twitter, Inc.
2
+ # Copyright (C) 2019 Twitter, Inc.
3
3
 
4
4
  module TwitterAds
5
5
  module ReachEstimate
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
- # Copyright (C) 2015 Twitter, Inc.
2
+ # Copyright (C) 2019 Twitter, Inc.
3
3
 
4
4
  module TwitterAds
5
5
  class AppStoreCategory
@@ -12,8 +12,8 @@ module TwitterAds
12
12
  property :targeting_type, read_only: true
13
13
  property :targeting_value, read_only: true
14
14
 
15
- RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" +
16
- 'targeting_criteria/app_store_categories'.freeze # @api private
15
+ RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" \
16
+ 'targeting_criteria/app_store_categories' # @api private
17
17
 
18
18
  def initialize(account)
19
19
  @account = account
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
- # Copyright (C) 2015 Twitter, Inc.
2
+ # Copyright (C) 2019 Twitter, Inc.
3
3
 
4
4
  module TwitterAds
5
5
  class Behavior
@@ -16,8 +16,8 @@ module TwitterAds
16
16
  property :partner_source, read_only: true
17
17
  property :targetable_type, read_only: true
18
18
 
19
- RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" +
20
- 'targeting_criteria/behaviors'.freeze # @api private
19
+ RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" \
20
+ 'targeting_criteria/behaviors' # @api private
21
21
 
22
22
  def initialize(account)
23
23
  @account = account
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
- # Copyright (C) 2015 Twitter, Inc.
2
+ # Copyright (C) 2019 Twitter, Inc.
3
3
 
4
4
  module TwitterAds
5
5
  class BehaviorTaxonomy
@@ -13,8 +13,8 @@ module TwitterAds
13
13
  property :created_at, read_only: true
14
14
  property :updated_at, read_only: true
15
15
 
16
- RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" +
17
- 'targeting_criteria/behavior_taxonomies'.freeze # @api private
16
+ RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" \
17
+ 'targeting_criteria/behavior_taxonomies' # @api private
18
18
 
19
19
  def initialize(account)
20
20
  @account = account
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
- # Copyright (C) 2015 Twitter, Inc.
2
+ # Copyright (C) 2019 Twitter, Inc.
3
3
 
4
4
  module TwitterAds
5
5
  class Device
@@ -14,8 +14,8 @@ module TwitterAds
14
14
  property :platform, read_only: true
15
15
  property :manufacturer, read_only: true
16
16
 
17
- RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" +
18
- 'targeting_criteria/devices'.freeze # @api private
17
+ RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" \
18
+ 'targeting_criteria/devices' # @api private
19
19
 
20
20
  def initialize(account)
21
21
  @account = account
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
- # Copyright (C) 2015 Twitter, Inc.
2
+ # Copyright (C) 2019 Twitter, Inc.
3
3
 
4
4
  module TwitterAds
5
5
  class Event
@@ -22,8 +22,8 @@ module TwitterAds
22
22
  property :device_breakdown_percentage, read_only: true
23
23
  property :country_breakdown_percentage, read_only: true
24
24
 
25
- RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" +
26
- 'targeting_criteria/events'.freeze # @api private
25
+ RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" \
26
+ 'targeting_criteria/events' # @api private
27
27
 
28
28
  def initialize(account)
29
29
  @account = account
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
- # Copyright (C) 2015 Twitter, Inc.
2
+ # Copyright (C) 2019 Twitter, Inc.
3
3
 
4
4
  module TwitterAds
5
5
  class Interest
@@ -12,8 +12,8 @@ module TwitterAds
12
12
  property :targeting_value, read_only: true
13
13
  property :localized_name, read_only: true
14
14
 
15
- RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" +
16
- 'targeting_criteria/interests'.freeze # @api private
15
+ RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" \
16
+ 'targeting_criteria/interests' # @api private
17
17
 
18
18
  def initialize(account)
19
19
  @account = account
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
- # Copyright (C) 2015 Twitter, Inc.
2
+ # Copyright (C) 2019 Twitter, Inc.
3
3
 
4
4
  module TwitterAds
5
5
  class Language
@@ -11,8 +11,8 @@ module TwitterAds
11
11
  property :targeting_type, read_only: true
12
12
  property :targeting_value, read_only: true
13
13
 
14
- RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" +
15
- 'targeting_criteria/languages'.freeze # @api private
14
+ RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" \
15
+ 'targeting_criteria/languages' # @api private
16
16
 
17
17
  def initialize(account)
18
18
  @account = account
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
- # Copyright (C) 2015 Twitter, Inc.
2
+ # Copyright (C) 2019 Twitter, Inc.
3
3
 
4
4
  module TwitterAds
5
5
  class Location
@@ -12,8 +12,8 @@ module TwitterAds
12
12
  property :targeting_value, read_only: true
13
13
  property :location_type, read_only: true
14
14
 
15
- RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" +
16
- 'targeting_criteria/locations'.freeze # @api private
15
+ RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" \
16
+ 'targeting_criteria/locations' # @api private
17
17
 
18
18
  def initialize(account)
19
19
  @account = account
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
- # Copyright (C) 2015 Twitter, Inc.
2
+ # Copyright (C) 2019 Twitter, Inc.
3
3
 
4
4
  module TwitterAds
5
5
  class NetworkOperator
@@ -12,8 +12,8 @@ module TwitterAds
12
12
  property :targeting_value, read_only: true
13
13
  property :country_code, read_only: true
14
14
 
15
- RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" +
16
- 'targeting_criteria/network_operators'.freeze # @api private
15
+ RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" \
16
+ 'targeting_criteria/network_operators' # @api private
17
17
 
18
18
  def initialize(account)
19
19
  @account = account