facebookbusiness 0.15.0.2 → 0.16.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/facebook_ads/ad_objects/ad_account.rb +11 -0
- data/lib/facebook_ads/ad_objects/ad_account_ad_volume.rb +2 -0
- data/lib/facebook_ads/ad_objects/ad_set.rb +1 -0
- data/lib/facebook_ads/ad_objects/ad_video.rb +2 -0
- data/lib/facebook_ads/ad_objects/ads_pixel.rb +36 -0
- data/lib/facebook_ads/ad_objects/business.rb +219 -0
- data/lib/facebook_ads/ad_objects/event.rb +1 -0
- data/lib/facebook_ads/ad_objects/group.rb +0 -8
- data/lib/facebook_ads/ad_objects/ig_user.rb +4 -0
- data/lib/facebook_ads/ad_objects/lead.rb +1 -0
- data/lib/facebook_ads/ad_objects/offline_conversion_data_set.rb +27 -0
- data/lib/facebook_ads/ad_objects/page.rb +6 -0
- data/lib/facebook_ads/ad_objects/server_side/app_data.rb +269 -0
- data/lib/facebook_ads/ad_objects/server_side/event.rb +21 -1
- data/lib/facebook_ads/ad_objects/server_side/event_request.rb +10 -2
- data/lib/facebook_ads/ad_objects/server_side/extended_device_info.rb +344 -0
- data/lib/facebook_ads/ad_objects/server_side/user_data.rb +67 -2
- data/lib/facebook_ads/ad_objects/user.rb +2 -0
- data/lib/facebook_ads/ad_objects/user_page_one_time_opt_in_token_settings.rb +1 -0
- data/lib/facebook_ads/ad_objects/vehicle.rb +0 -1
- data/lib/facebook_ads/ad_objects/whats_app_business_account.rb +3 -3
- data/lib/facebook_ads/edge.rb +1 -1
- data/lib/facebook_ads/field_types/upload_file.rb +2 -2
- data/lib/facebook_ads/test/config.rb +2 -2
- data/lib/facebook_ads/version.rb +2 -2
- data/lib/facebook_ads/videos/video_io.rb +2 -0
- metadata +34 -40
@@ -0,0 +1,344 @@
|
|
1
|
+
# Copyright (c) 2017-present, Facebook, Inc. All rights reserved.
|
2
|
+
#
|
3
|
+
# You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
|
4
|
+
# copy, modify, and distribute this software in source code or binary form for use
|
5
|
+
# in connection with the web services and APIs provided by Facebook.
|
6
|
+
#
|
7
|
+
# As with any software that integrates with the Facebook platform, your use of
|
8
|
+
# this software is subject to the Facebook Platform Policy
|
9
|
+
# [http://developers.facebook.com/policy/]. This copyright notice shall be
|
10
|
+
# included in all copies or substantial portions of the software.
|
11
|
+
#
|
12
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
13
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
14
|
+
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
15
|
+
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
16
|
+
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
17
|
+
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
18
|
+
|
19
|
+
|
20
|
+
module FacebookAds
|
21
|
+
module ServerSide
|
22
|
+
# ExtendedDeviceInfo, such as screen width and height. This parameter is an array and values are separated by commas.
|
23
|
+
class ExtendedDeviceInfo
|
24
|
+
|
25
|
+
attr_accessor :ext_info_version,
|
26
|
+
:app_package_name,
|
27
|
+
:short_version,
|
28
|
+
:long_version,
|
29
|
+
:os_version,
|
30
|
+
:device_model_name,
|
31
|
+
:locale,
|
32
|
+
:timezone_abbreviation,
|
33
|
+
:carrier,
|
34
|
+
:screen_width,
|
35
|
+
:screen_height,
|
36
|
+
:screen_density,
|
37
|
+
:cpu_core_count,
|
38
|
+
:total_disk_space_gb,
|
39
|
+
:free_disk_space_gb,
|
40
|
+
:device_time_zone
|
41
|
+
|
42
|
+
# Initializes the object
|
43
|
+
# @param [String] ext_info_version
|
44
|
+
# @param [String] app_package_name
|
45
|
+
# @param [String] short_version
|
46
|
+
# @param [String] long_version
|
47
|
+
# @param [String] os_version
|
48
|
+
# @param [String] device_model_name
|
49
|
+
# @param [String] locale
|
50
|
+
# @param [String] timezone_abbreviation
|
51
|
+
# @param [String] carrier
|
52
|
+
# @param [String] screen_width
|
53
|
+
# @param [String] screen_height
|
54
|
+
# @param [String] screen_density
|
55
|
+
# @param [String] cpu_core_count
|
56
|
+
# @param [String] total_disk_space_gb
|
57
|
+
# @param [String] free_disk_space_gb
|
58
|
+
# @param [String] device_time_zone
|
59
|
+
def initialize(ext_info_version: nil, app_package_name: nil, short_version: nil, long_version: nil, os_version: nil, device_model_name: nil, locale: nil, timezone_abbreviation: nil,
|
60
|
+
carrier: nil, screen_width: nil, screen_height: nil, screen_density: nil, cpu_core_count: nil, total_disk_space_gb: nil, free_disk_space_gb: nil, device_time_zone: nil)
|
61
|
+
unless ext_info_version.nil?
|
62
|
+
self.ext_info_version = String(ext_info_version)
|
63
|
+
end
|
64
|
+
unless app_package_name.nil?
|
65
|
+
self.app_package_name = String(app_package_name)
|
66
|
+
end
|
67
|
+
unless short_version.nil?
|
68
|
+
self.short_version = String(short_version)
|
69
|
+
end
|
70
|
+
unless long_version.nil?
|
71
|
+
self.long_version = String(long_version)
|
72
|
+
end
|
73
|
+
unless os_version.nil?
|
74
|
+
self.os_version = String(os_version)
|
75
|
+
end
|
76
|
+
unless device_model_name.nil?
|
77
|
+
self.device_model_name = String(device_model_name)
|
78
|
+
end
|
79
|
+
unless locale.nil?
|
80
|
+
self.locale = String(locale)
|
81
|
+
end
|
82
|
+
unless timezone_abbreviation.nil?
|
83
|
+
self.timezone_abbreviation = String(timezone_abbreviation)
|
84
|
+
end
|
85
|
+
unless carrier.nil?
|
86
|
+
self.carrier = String(carrier)
|
87
|
+
end
|
88
|
+
unless screen_width.nil?
|
89
|
+
self.screen_width = String(screen_width)
|
90
|
+
end
|
91
|
+
unless screen_height.nil?
|
92
|
+
self.screen_height = String(screen_height)
|
93
|
+
end
|
94
|
+
unless screen_density.nil?
|
95
|
+
self.screen_density = String(screen_density)
|
96
|
+
end
|
97
|
+
unless cpu_core_count.nil?
|
98
|
+
self.cpu_core_count = String(cpu_core_count)
|
99
|
+
end
|
100
|
+
unless total_disk_space_gb.nil?
|
101
|
+
self.total_disk_space_gb = String(total_disk_space_gb)
|
102
|
+
end
|
103
|
+
unless free_disk_space_gb.nil?
|
104
|
+
self.free_disk_space_gb = String(free_disk_space_gb)
|
105
|
+
end
|
106
|
+
unless device_time_zone.nil?
|
107
|
+
self.device_time_zone = String(device_time_zone)
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
# build the object using the input hash
|
112
|
+
# @param [Hash] attributes attributes in the form of hash
|
113
|
+
def build(attributes = {})
|
114
|
+
return unless attributes.is_a?(Hash)
|
115
|
+
|
116
|
+
# convert string to symbol for hash key
|
117
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
118
|
+
|
119
|
+
if attributes.has_key?(:'ext_info_version')
|
120
|
+
self.ext_info_version = attributes[:'ext_info_version']
|
121
|
+
end
|
122
|
+
|
123
|
+
if attributes.has_key?(:'app_package_name')
|
124
|
+
self.app_package_name = attributes[:'app_package_name']
|
125
|
+
end
|
126
|
+
|
127
|
+
if attributes.has_key?(:'short_version')
|
128
|
+
self.short_version = attributes[:'short_version']
|
129
|
+
end
|
130
|
+
|
131
|
+
if attributes.has_key?(:'long_version')
|
132
|
+
self.long_version = attributes[:'long_version']
|
133
|
+
end
|
134
|
+
|
135
|
+
if attributes.has_key?(:'os_version')
|
136
|
+
self.os_version = attributes[:'os_version']
|
137
|
+
end
|
138
|
+
|
139
|
+
if attributes.has_key?(:'device_model_name')
|
140
|
+
self.device_model_name = attributes[:'device_model_name']
|
141
|
+
end
|
142
|
+
|
143
|
+
if attributes.has_key?(:'locale')
|
144
|
+
self.locale = attributes[:'locale']
|
145
|
+
end
|
146
|
+
|
147
|
+
if attributes.has_key?(:'timezone_abbreviation')
|
148
|
+
self.timezone_abbreviation = attributes[:'timezone_abbreviation']
|
149
|
+
end
|
150
|
+
|
151
|
+
if attributes.has_key?(:'carrier')
|
152
|
+
self.carrier = attributes[:'carrier']
|
153
|
+
end
|
154
|
+
|
155
|
+
if attributes.has_key?(:'screen_width')
|
156
|
+
self.screen_width = attributes[:'screen_width']
|
157
|
+
end
|
158
|
+
|
159
|
+
if attributes.has_key?(:'screen_height')
|
160
|
+
self.screen_height = attributes[:'screen_height']
|
161
|
+
end
|
162
|
+
|
163
|
+
if attributes.has_key?(:'screen_density')
|
164
|
+
self.screen_density = attributes[:'screen_density']
|
165
|
+
end
|
166
|
+
|
167
|
+
if attributes.has_key?(:'cpu_core_count')
|
168
|
+
self.cpu_core_count = attributes[:'cpu_core_count']
|
169
|
+
end
|
170
|
+
|
171
|
+
if attributes.has_key?(:'total_disk_space_gb')
|
172
|
+
self.total_disk_space_gb = attributes[:'total_disk_space_gb']
|
173
|
+
end
|
174
|
+
|
175
|
+
if attributes.has_key?(:'free_disk_space_gb')
|
176
|
+
self.free_disk_space_gb = attributes[:'free_disk_space_gb']
|
177
|
+
end
|
178
|
+
|
179
|
+
if attributes.has_key?(:'device_time_zone')
|
180
|
+
self.device_time_zone = attributes[:'device_time_zone']
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
|
185
|
+
# Checks equality by comparing each attribute.
|
186
|
+
def ==(o)
|
187
|
+
return self.class == o.class &&
|
188
|
+
ext_info_version == o.ext_info_version &&
|
189
|
+
app_package_name == o.app_package_name &&
|
190
|
+
short_version == o.short_version &&
|
191
|
+
long_version == o.long_version &&
|
192
|
+
os_version == o.os_version &&
|
193
|
+
device_model_name == o.device_model_name &&
|
194
|
+
locale == o.locale &&
|
195
|
+
timezone_abbreviation == o.timezone_abbreviation &&
|
196
|
+
carrier == o.carrier &&
|
197
|
+
screen_width == o.screen_width &&
|
198
|
+
screen_height == o.screen_height &&
|
199
|
+
screen_density == o.screen_density &&
|
200
|
+
cpu_core_count == o.cpu_core_count &&
|
201
|
+
total_disk_space_gb == o.total_disk_space_gb &&
|
202
|
+
free_disk_space_gb == o.free_disk_space_gb &&
|
203
|
+
device_time_zone == o.device_time_zone
|
204
|
+
end
|
205
|
+
|
206
|
+
# @see the `==` method
|
207
|
+
def eql?(o)
|
208
|
+
self == o
|
209
|
+
end
|
210
|
+
|
211
|
+
# Calculates hash code according to all attributes.
|
212
|
+
# @return [Fixnum] Hash code
|
213
|
+
def hash
|
214
|
+
[
|
215
|
+
ext_info_version,
|
216
|
+
app_package_name,
|
217
|
+
short_version,
|
218
|
+
long_version,
|
219
|
+
os_version,
|
220
|
+
device_model_name,
|
221
|
+
locale,
|
222
|
+
timezone_abbreviation,
|
223
|
+
carrier,
|
224
|
+
screen_width,
|
225
|
+
screen_height,
|
226
|
+
screen_density,
|
227
|
+
cpu_core_count,
|
228
|
+
total_disk_space_gb,
|
229
|
+
free_disk_space_gb,
|
230
|
+
device_time_zone
|
231
|
+
].hash
|
232
|
+
end
|
233
|
+
|
234
|
+
# Returns the string representation of the object
|
235
|
+
# @return [String] String presentation of the object
|
236
|
+
def to_s
|
237
|
+
hash = {}
|
238
|
+
unless ext_info_version.nil?
|
239
|
+
hash['ext_info_version'] = ext_info_version
|
240
|
+
end
|
241
|
+
unless app_package_name.nil?
|
242
|
+
hash['app_package_name'] = app_package_name
|
243
|
+
end
|
244
|
+
unless short_version.nil?
|
245
|
+
hash['short_version'] = short_version
|
246
|
+
end
|
247
|
+
unless long_version.nil?
|
248
|
+
hash['long_version'] = long_version
|
249
|
+
end
|
250
|
+
unless os_version.nil?
|
251
|
+
hash['os_version'] = os_version
|
252
|
+
end
|
253
|
+
unless device_model_name.nil?
|
254
|
+
hash['device_model_name'] = device_model_name
|
255
|
+
end
|
256
|
+
unless locale.nil?
|
257
|
+
hash['locale'] = locale
|
258
|
+
end
|
259
|
+
unless timezone_abbreviation.nil?
|
260
|
+
hash['timezone_abbreviation'] = timezone_abbreviation
|
261
|
+
end
|
262
|
+
unless carrier.nil?
|
263
|
+
hash['carrier'] = carrier
|
264
|
+
end
|
265
|
+
unless screen_width.nil?
|
266
|
+
hash['screen_width'] = screen_width
|
267
|
+
end
|
268
|
+
unless screen_height.nil?
|
269
|
+
hash['screen_height'] = screen_height
|
270
|
+
end
|
271
|
+
unless screen_density.nil?
|
272
|
+
hash['screen_density'] = screen_density
|
273
|
+
end
|
274
|
+
unless cpu_core_count.nil?
|
275
|
+
hash['cpu_core_count'] = cpu_core_count
|
276
|
+
end
|
277
|
+
unless total_disk_space_gb.nil?
|
278
|
+
hash['total_disk_space_gb'] = total_disk_space_gb
|
279
|
+
end
|
280
|
+
unless free_disk_space_gb.nil?
|
281
|
+
hash['free_disk_space_gb'] = free_disk_space_gb
|
282
|
+
end
|
283
|
+
unless device_time_zone.nil?
|
284
|
+
hash['device_time_zone'] = device_time_zone
|
285
|
+
end
|
286
|
+
hash.to_s
|
287
|
+
end
|
288
|
+
|
289
|
+
# Normalize input fields to server request format.
|
290
|
+
def normalize
|
291
|
+
ext_info_array = []
|
292
|
+
unless ext_info_version.nil?
|
293
|
+
ext_info_array.push(ext_info_version)
|
294
|
+
end
|
295
|
+
unless app_package_name.nil?
|
296
|
+
ext_info_array.push(app_package_name)
|
297
|
+
end
|
298
|
+
unless short_version.nil?
|
299
|
+
ext_info_array.push(short_version)
|
300
|
+
end
|
301
|
+
unless long_version.nil?
|
302
|
+
ext_info_array.push(long_version)
|
303
|
+
end
|
304
|
+
unless os_version.nil?
|
305
|
+
ext_info_array.push(os_version)
|
306
|
+
end
|
307
|
+
unless device_model_name.nil?
|
308
|
+
ext_info_array.push(device_model_name)
|
309
|
+
end
|
310
|
+
unless locale.nil?
|
311
|
+
ext_info_array.push(locale)
|
312
|
+
end
|
313
|
+
unless timezone_abbreviation.nil?
|
314
|
+
ext_info_array.push(timezone_abbreviation)
|
315
|
+
end
|
316
|
+
unless carrier.nil?
|
317
|
+
ext_info_array.push(carrier)
|
318
|
+
end
|
319
|
+
unless screen_width.nil?
|
320
|
+
ext_info_array.push(screen_width)
|
321
|
+
end
|
322
|
+
unless screen_height.nil?
|
323
|
+
ext_info_array.push(screen_height)
|
324
|
+
end
|
325
|
+
unless screen_density.nil?
|
326
|
+
ext_info_array.push(screen_density)
|
327
|
+
end
|
328
|
+
unless cpu_core_count.nil?
|
329
|
+
ext_info_array.push(cpu_core_count)
|
330
|
+
end
|
331
|
+
unless total_disk_space_gb.nil?
|
332
|
+
ext_info_array.push(total_disk_space_gb)
|
333
|
+
end
|
334
|
+
unless free_disk_space_gb.nil?
|
335
|
+
ext_info_array.push(free_disk_space_gb)
|
336
|
+
end
|
337
|
+
unless device_time_zone.nil?
|
338
|
+
ext_info_array.push(device_time_zone)
|
339
|
+
end
|
340
|
+
ext_info_array
|
341
|
+
end
|
342
|
+
end
|
343
|
+
end
|
344
|
+
end
|
@@ -216,6 +216,27 @@ module FacebookAds
|
|
216
216
|
# The date of birth year.
|
217
217
|
attr_accessor :doby
|
218
218
|
|
219
|
+
# Your Install ID. This field represents unique application installation instances.
|
220
|
+
attr_accessor :anon_ids
|
221
|
+
|
222
|
+
def anon_id
|
223
|
+
@anon_ids ? @anon_ids[0] : nil
|
224
|
+
end
|
225
|
+
def anon_id=(anon_id)
|
226
|
+
@anon_ids = [anon_id]
|
227
|
+
end
|
228
|
+
|
229
|
+
# Your mobile advertiser ID, the advertising ID from an Android device or the Advertising Identifier (IDFA) from an Apple device.
|
230
|
+
attr_accessor :madids
|
231
|
+
|
232
|
+
def madid
|
233
|
+
@madids ? @madids[0] : nil
|
234
|
+
end
|
235
|
+
def madid=(madid)
|
236
|
+
@madids = [madid]
|
237
|
+
end
|
238
|
+
|
239
|
+
|
219
240
|
#UserData is a set of identifiers Facebook can use for targeted attribution
|
220
241
|
# @param [String] email
|
221
242
|
# @param [Array<String>] emails
|
@@ -251,13 +272,17 @@ module FacebookAds
|
|
251
272
|
# @param [String] dobd
|
252
273
|
# @param [String] dobm
|
253
274
|
# @param [String] doby
|
275
|
+
# @param [String] anon_id
|
276
|
+
# @param [Array<String>] anon_ids
|
277
|
+
# @param [String] madid
|
278
|
+
# @param [Array<String>] madids
|
254
279
|
def initialize(email: nil, emails: nil, phone: nil, phones: nil, gender: nil, genders: nil,
|
255
280
|
date_of_birth: nil, dates_of_birth: nil, last_name: nil, last_names: nil,
|
256
281
|
first_name: nil, first_names: nil, city: nil, cities: nil, state: nil, states: nil,
|
257
282
|
country_code: nil, country_codes: nil, zip_code: nil, zip_codes: nil,
|
258
283
|
external_id: nil, external_ids: nil, client_ip_address: nil,
|
259
284
|
client_user_agent: nil, fbc: nil, fbp: nil, subscription_id: nil, lead_id: nil,
|
260
|
-
f5first: nil, f5last: nil, fi: nil, dobd: nil, dobm: nil, doby: nil)
|
285
|
+
f5first: nil, f5last: nil, fi: nil, dobd: nil, dobm: nil, doby: nil, anon_id: nil, anon_ids: nil, madid:nil, madids: nil)
|
261
286
|
validate_constructor_values(emails, email, 'emails', 'email')
|
262
287
|
validate_constructor_values(phones, phone, 'phones', 'phone')
|
263
288
|
validate_constructor_values(genders, gender, 'genders', 'gender')
|
@@ -372,6 +397,18 @@ module FacebookAds
|
|
372
397
|
unless doby.nil?
|
373
398
|
self.doby = doby
|
374
399
|
end
|
400
|
+
unless anon_id.nil?
|
401
|
+
self.anon_id = anon_id
|
402
|
+
end
|
403
|
+
unless anon_ids.nil?
|
404
|
+
self.anon_ids = anon_ids
|
405
|
+
end
|
406
|
+
unless madid.nil?
|
407
|
+
self.madid = madid
|
408
|
+
end
|
409
|
+
unless madids.nil?
|
410
|
+
self.madids = madids
|
411
|
+
end
|
375
412
|
end
|
376
413
|
|
377
414
|
# build the object using the input hash
|
@@ -491,6 +528,18 @@ module FacebookAds
|
|
491
528
|
if attributes.has_key?(:'doby')
|
492
529
|
self.doby = attributes[:'doby']
|
493
530
|
end
|
531
|
+
|
532
|
+
if attributes.has_key?(:'anon_ids')
|
533
|
+
self.anon_ids = attributes[:'anon_ids']
|
534
|
+
elsif attributes.has_key?(:'anon_id')
|
535
|
+
self.anon_ids = [attributes[:'anon_id']]
|
536
|
+
end
|
537
|
+
|
538
|
+
if attributes.has_key?(:'madids')
|
539
|
+
self.madids = attributes[:'madids']
|
540
|
+
elsif attributes.has_key?(:'madid')
|
541
|
+
self.madids = [attributes[:'madid']]
|
542
|
+
end
|
494
543
|
end
|
495
544
|
|
496
545
|
# Checks equality by comparing each attribute.
|
@@ -519,7 +568,9 @@ module FacebookAds
|
|
519
568
|
fi == o.fi &&
|
520
569
|
dobd == o.dobd &&
|
521
570
|
dobm == o.dobm &&
|
522
|
-
doby == o.doby
|
571
|
+
doby == o.doby &&
|
572
|
+
anon_ids == o.anon_ids &&
|
573
|
+
madids == o.madids
|
523
574
|
end
|
524
575
|
|
525
576
|
# @see the `==` method
|
@@ -554,6 +605,8 @@ module FacebookAds
|
|
554
605
|
dobd,
|
555
606
|
dobm,
|
556
607
|
doby,
|
608
|
+
anon_ids,
|
609
|
+
madids
|
557
610
|
].hash
|
558
611
|
|
559
612
|
end
|
@@ -631,6 +684,12 @@ module FacebookAds
|
|
631
684
|
unless doby.nil?
|
632
685
|
hash['doby'] = doby
|
633
686
|
end
|
687
|
+
unless anon_ids.nil?
|
688
|
+
hash['anon_ids'] = anon_ids
|
689
|
+
end
|
690
|
+
unless madids.nil?
|
691
|
+
hash['madids'] = madids
|
692
|
+
end
|
634
693
|
hash.to_s
|
635
694
|
end
|
636
695
|
|
@@ -707,6 +766,12 @@ module FacebookAds
|
|
707
766
|
unless doby.nil?
|
708
767
|
hash['doby'] = FacebookAds::ServerSide::Util.normalize(doby, 'doby')
|
709
768
|
end
|
769
|
+
unless anon_id.nil?
|
770
|
+
hash['anon_id'] = anon_ids
|
771
|
+
end
|
772
|
+
unless madid.nil?
|
773
|
+
hash['madid'] = madids
|
774
|
+
end
|
710
775
|
hash.select{|k, v| !v.nil?}
|
711
776
|
end
|
712
777
|
|
@@ -99,6 +99,7 @@ module FacebookAds
|
|
99
99
|
edge.delete
|
100
100
|
edge.post 'User' do |api|
|
101
101
|
api.has_param :business_app, 'int'
|
102
|
+
api.has_param :is_permanent_token, 'bool'
|
102
103
|
api.has_param :page_id, 'string'
|
103
104
|
api.has_param :scope, { list: 'Permission' }
|
104
105
|
end
|
@@ -474,6 +475,7 @@ module FacebookAds
|
|
474
475
|
|
475
476
|
has_edge :notifications do |edge|
|
476
477
|
edge.post 'User' do |api|
|
478
|
+
api.has_param :bot_message_payload_elements, 'string'
|
477
479
|
api.has_param :filtering, { list: { enum: -> { User::FILTERING }} }
|
478
480
|
api.has_param :href, 'object'
|
479
481
|
api.has_param :label, 'string'
|
@@ -28,6 +28,7 @@ module FacebookAds
|
|
28
28
|
class UserPageOneTimeOptInTokenSettings < AdObject
|
29
29
|
|
30
30
|
field :creation_timestamp, 'int'
|
31
|
+
field :next_eligible_time, 'int'
|
31
32
|
field :notification_messages_frequency, 'string'
|
32
33
|
field :notification_messages_reoptin, 'string'
|
33
34
|
field :notification_messages_timezone, 'string'
|
@@ -137,7 +137,6 @@ module FacebookAds
|
|
137
137
|
field :condition, 'string'
|
138
138
|
field :currency, 'string'
|
139
139
|
field :custom_label_0, 'string'
|
140
|
-
field :custom_number_0, 'int'
|
141
140
|
field :date_first_on_lot, 'string'
|
142
141
|
field :dealer_communication_channel, 'string'
|
143
142
|
field :dealer_email, 'string'
|
@@ -30,17 +30,17 @@ module FacebookAds
|
|
30
30
|
"DEVELOP",
|
31
31
|
"FULL_CONTROL",
|
32
32
|
"MANAGE",
|
33
|
+
"MANAGE_EXTENSIONS",
|
33
34
|
"MANAGE_PHONE",
|
34
35
|
"MANAGE_TEMPLATES",
|
35
|
-
"MANAGE_TEMPLATES_AND_PHONE",
|
36
36
|
"MESSAGING",
|
37
37
|
"VIEW_COST",
|
38
38
|
]
|
39
39
|
|
40
40
|
CATEGORY = [
|
41
|
+
"AUTHENTICATION",
|
41
42
|
"MARKETING",
|
42
|
-
"
|
43
|
-
"TRANSACTIONAL",
|
43
|
+
"UTILITY",
|
44
44
|
]
|
45
45
|
|
46
46
|
|
data/lib/facebook_ads/edge.rb
CHANGED
@@ -77,7 +77,7 @@ module FacebookAds
|
|
77
77
|
case value
|
78
78
|
when String, File, Tempfile
|
79
79
|
if value.is_a?(String)
|
80
|
-
raise InvalidParameterError, "No such file: #{value}" unless File.
|
80
|
+
raise InvalidParameterError, "No such file: #{value}" unless File.exist?(value)
|
81
81
|
value = File.new(value)
|
82
82
|
end
|
83
83
|
|
@@ -114,7 +114,7 @@ module FacebookAds
|
|
114
114
|
return true if value.is_a?(type)
|
115
115
|
end
|
116
116
|
|
117
|
-
value.is_a?(String) ? File.
|
117
|
+
value.is_a?(String) ? File.exist?(value) : false
|
118
118
|
end
|
119
119
|
end
|
120
120
|
end
|
@@ -41,7 +41,7 @@ module FacebookAds
|
|
41
41
|
|
42
42
|
def override_from!(filename = nil)
|
43
43
|
filename ||= File.expand_path("../../../../tests/test_config.json", __FILE__)
|
44
|
-
if File.
|
44
|
+
if File.exist?(filename)
|
45
45
|
settings = JSON.parse(File.read(filename))
|
46
46
|
|
47
47
|
settings.each do |k,v|
|
@@ -52,4 +52,4 @@ module FacebookAds
|
|
52
52
|
end
|
53
53
|
end
|
54
54
|
end
|
55
|
-
end
|
55
|
+
end
|
data/lib/facebook_ads/version.rb
CHANGED
@@ -16,6 +16,8 @@
|
|
16
16
|
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
17
17
|
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
18
18
|
|
19
|
+
require 'faraday/multipart'
|
20
|
+
|
19
21
|
module FacebookAds
|
20
22
|
class VideoIO < ::UploadIO
|
21
23
|
def is_video?
|