facebookbusiness 0.5.0.3 → 0.5.0.4

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: dac6e5e4ba5f7823fd8d6eacb17ab3f2b0d92e15de77b542f0e0cf3f78bd7362
4
- data.tar.gz: 6a052371c32cdfef6b8ef3296d327bd0b9bdb37297accd2a1ede56a636cfe0de
3
+ metadata.gz: b2f3364c15486538d87f8ff31c8fc6ab3d8d76f88e7346e67f70b54467ad870b
4
+ data.tar.gz: 3044a1c8aeda9827dc9d8e5f01b6d5f86e627de1b77c04b807681710ea599ef9
5
5
  SHA512:
6
- metadata.gz: 2e77d3a21bbe898b7541aa7d4eacf134f9277ee131c893d0ff0019ea83e263eb798ac8a5385a6fc98345a5e6d9c3460408fae6f5ba44372717586e6aa5caa23d
7
- data.tar.gz: 50b100a7675b68318713c860e480977672970e28ad939233bf0ced2dd5d579688da79e72df0486e0dc1d7eeb5464e0c61c33fe0497d8e783e52689af4ceeaa4a
6
+ metadata.gz: 9a0a9d0869a1025476e970fc6be613b6afdbe6367204350187c6b2113e3a5bdd15091504ff804c5174128d45814794c7262325662a26457d018097f447543d83
7
+ data.tar.gz: 5f1510cde5f6118f2a0dab4cd34e8897691b5394d01c39c33eebc54d551a213ab8b51807412eb3cb14fee08afd806bb4bffd68193f5fcea5b2dad66006776ed3
data/lib/facebook_ads.rb CHANGED
@@ -66,15 +66,17 @@ module FacebookAds
66
66
  autoload class_name, file
67
67
  end
68
68
 
69
- # Autoload Server-Side API
70
- Dir.glob(File.expand_path(File.join(__FILE__, '..', 'facebook_ads', 'ad_objects', 'server_side', '*.rb'))).each do |file|
71
- class_name = File.basename(file, '.rb').split('_').map(&:capitalize).join.to_sym
72
- autoload class_name, file
73
- end
74
-
75
69
  # Autoload AdObjects
76
70
  Dir.glob(File.expand_path(File.join(__FILE__, '..', 'facebook_ads', 'ad_objects', '*.rb'))).each do |file|
77
71
  class_name = File.basename(file, '.rb').split('_').map(&:capitalize).join.to_sym
78
72
  autoload class_name, file
79
73
  end
74
+
75
+ module ServerSide
76
+ # Autoload Server-Side API
77
+ Dir.glob(File.expand_path(File.join(__FILE__, '..', 'facebook_ads', 'ad_objects', 'server_side', '*.rb'))).each do |file|
78
+ class_name = File.basename(file, '.rb').split('_').map(&:capitalize).join.to_sym
79
+ autoload class_name, file
80
+ end
81
+ end
80
82
  end
@@ -66,6 +66,10 @@ module FacebookAds
66
66
  # Example: 'registered'.
67
67
  attr_accessor :status
68
68
 
69
+ # Use only with Search events. A search query made by a user.
70
+ # Example: 'lettuce'.
71
+ attr_accessor :search_string
72
+
69
73
 
70
74
  # @param [Float] value
71
75
  # @param [String] currency
@@ -78,6 +82,7 @@ module FacebookAds
78
82
  # @param [Float] predicted_ltv
79
83
  # @param [Integer] num_items
80
84
  # @param [String] status
85
+ # @param [String] search_string
81
86
  def initialize(value: nil,
82
87
  currency: nil,
83
88
  content_name: nil,
@@ -88,7 +93,8 @@ module FacebookAds
88
93
  order_id: nil,
89
94
  predicted_ltv: nil,
90
95
  num_items: nil,
91
- status: nil)
96
+ status: nil,
97
+ search_string: nil)
92
98
 
93
99
  unless value.nil?
94
100
  self.value = value
@@ -123,6 +129,9 @@ module FacebookAds
123
129
  unless status.nil?
124
130
  self.status = status
125
131
  end
132
+ unless search_string.nil?
133
+ self.search_string = search_string
134
+ end
126
135
  end
127
136
 
128
137
 
@@ -181,6 +190,10 @@ module FacebookAds
181
190
  if attributes.has_key?(:'status')
182
191
  self.status = attributes[:'status']
183
192
  end
193
+
194
+ if attributes.has_key?(:'search_string')
195
+ self.search_string = attributes[:'search_string']
196
+ end
184
197
  end
185
198
 
186
199
  # Checks equality by comparing each attribute.
@@ -197,7 +210,8 @@ module FacebookAds
197
210
  order_id == o.order_id &&
198
211
  predicted_ltv == o.predicted_ltv &&
199
212
  num_items == o.num_items &&
200
- status == o.status
213
+ status == o.status &&
214
+ search_string == o.search_string
201
215
  end
202
216
 
203
217
  # @see the `==` method
@@ -219,7 +233,8 @@ module FacebookAds
219
233
  order_id,
220
234
  predicted_ltv,
221
235
  num_items,
222
- status
236
+ status,
237
+ search_string
223
238
  ].hash
224
239
  end
225
240
 
@@ -260,6 +275,9 @@ module FacebookAds
260
275
  unless status.nil?
261
276
  hash['status'] = status
262
277
  end
278
+ unless search_string.nil?
279
+ hash['search_string'] = search_string
280
+ end
263
281
  hash.to_s
264
282
  end
265
283
 
@@ -297,6 +315,9 @@ module FacebookAds
297
315
  unless status.nil?
298
316
  hash['status'] = status
299
317
  end
318
+ unless search_string.nil?
319
+ hash['search_string'] = search_string
320
+ end
300
321
 
301
322
  unless contents.nil?
302
323
  content_array = []
@@ -39,8 +39,11 @@ module FacebookAds
39
39
  # If set to true, we only use the event for attribution.
40
40
  attr_accessor :opt_out
41
41
 
42
- # An ID used by Facebook to deduplicate the same event sent from both server and browser.
43
- # This is used with event_name to determine if events are identical.
42
+ # This ID can be any unique string chosen by the advertiser.
43
+ # event_id is used to deduplicate events sent by both Facebook Pixel and
44
+ # Server-Side API. event_name is also used in the deduplication process.
45
+ # For deduplication, the eventID from Facebook pixel must match the
46
+ # event_id in the corresponding Server-Side API event.
44
47
  attr_accessor :event_id
45
48
 
46
49
  # An Object that contains user data.
@@ -19,6 +19,6 @@
19
19
  # FB:AUTOGEN
20
20
 
21
21
  module FacebookAds
22
- VERSION = '0.5.0.3'
22
+ VERSION = '0.5.0.4'
23
23
  API_VERSION = '5.0'
24
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: facebookbusiness
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0.3
4
+ version: 0.5.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Facebook
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-11 00:00:00.000000000 Z
11
+ date: 2019-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday