facebookbusiness 23.0.2 → 24.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 +4 -0
- data/lib/facebook_ads/ad_objects/ad_account_ad_volume.rb +17 -0
- data/lib/facebook_ads/ad_objects/ad_account_live_video_advertiser.rb +1 -0
- data/lib/facebook_ads/ad_objects/ad_account_matched_search_applications_edge_data.rb +2 -0
- data/lib/facebook_ads/ad_objects/ad_account_targeting_unified.rb +1 -0
- data/lib/facebook_ads/ad_objects/ad_creative.rb +5 -0
- data/lib/facebook_ads/ad_objects/ad_creative_destination_spec.rb +1 -0
- data/lib/facebook_ads/ad_objects/ad_creative_feature_customizations.rb +1 -0
- data/lib/facebook_ads/ad_objects/ad_creative_features_spec.rb +4 -0
- data/lib/facebook_ads/ad_objects/ad_creative_link_data_child_attachment.rb +1 -0
- data/lib/facebook_ads/ad_objects/ad_creative_media_sourcing_spec.rb +1 -0
- data/lib/facebook_ads/ad_objects/ad_creative_site_links_spec.rb +2 -0
- data/lib/facebook_ads/ad_objects/ad_preview.rb +0 -1
- data/lib/facebook_ads/ad_objects/ad_promoted_object.rb +1 -0
- data/lib/facebook_ads/ad_objects/ad_set.rb +3 -1
- data/lib/facebook_ads/ad_objects/ad_video.rb +1 -4
- data/lib/facebook_ads/ad_objects/ads_image_crops.rb +1 -0
- data/lib/facebook_ads/ad_objects/ads_insights.rb +2 -0
- data/lib/facebook_ads/ad_objects/ads_quick_views.rb +1 -0
- data/lib/facebook_ads/ad_objects/ads_user_settings.rb +5 -0
- data/lib/facebook_ads/ad_objects/ads_value_adjustment_rule_collection.rb +1 -1
- data/lib/facebook_ads/ad_objects/application.rb +0 -8
- data/lib/facebook_ads/ad_objects/branded_content_shadow_ig_media_id.rb +2 -0
- data/lib/facebook_ads/ad_objects/business.rb +13 -5
- data/lib/facebook_ads/ad_objects/commerce_merchant_settings.rb +0 -4
- data/lib/facebook_ads/ad_objects/copyright_ownership_transfer.rb +1 -0
- data/lib/facebook_ads/ad_objects/custom_audience.rb +1 -0
- data/lib/facebook_ads/ad_objects/event.rb +0 -1
- data/lib/facebook_ads/ad_objects/ig_media.rb +2 -1
- data/lib/facebook_ads/ad_objects/ig_user.rb +10 -0
- data/lib/facebook_ads/ad_objects/ig_user_for_ig_only_api.rb +1 -1
- data/lib/facebook_ads/ad_objects/live_video.rb +0 -1
- data/lib/facebook_ads/ad_objects/mc_experience_config_for_api.rb +1 -0
- data/lib/facebook_ads/ad_objects/omega_customer_trx.rb +0 -5
- data/lib/facebook_ads/ad_objects/open_bridge_configuration.rb +9 -0
- data/lib/facebook_ads/ad_objects/page.rb +0 -2
- data/lib/facebook_ads/ad_objects/placement_soft_opt_out.rb +31 -0
- data/lib/facebook_ads/ad_objects/product_catalog.rb +2 -0
- data/lib/facebook_ads/ad_objects/product_feed.rb +5 -0
- data/lib/facebook_ads/ad_objects/product_item.rb +2 -0
- data/lib/facebook_ads/ad_objects/server_side/attribution_data.rb +150 -4
- data/lib/facebook_ads/ad_objects/server_side/attribution_method.rb +30 -0
- data/lib/facebook_ads/ad_objects/server_side/attribution_setting.rb +107 -0
- data/lib/facebook_ads/ad_objects/server_side/decline_reason.rb +39 -0
- data/lib/facebook_ads/ad_objects/server_side/util.rb +24 -0
- data/lib/facebook_ads/ad_objects/shadow_ig_scheduled_media.rb +28 -0
- data/lib/facebook_ads/ad_objects/shadow_ig_user_thread_owner.rb +24 -0
- data/lib/facebook_ads/ad_objects/user.rb +0 -1
- data/lib/facebook_ads/ad_objects/whats_app_business_account.rb +18 -2
- data/lib/facebook_ads/version.rb +2 -2
- metadata +8 -3
- data/lib/facebook_ads/ad_objects/audio_release.rb +0 -38
|
@@ -14,13 +14,22 @@ module FacebookAds
|
|
|
14
14
|
# pull request for this class.
|
|
15
15
|
|
|
16
16
|
class OpenBridgeConfiguration < AdObject
|
|
17
|
+
EVENT_ENRICHMENT_STATE = [
|
|
18
|
+
"NO",
|
|
19
|
+
"NOT_INITIALIZED",
|
|
20
|
+
"YES",
|
|
21
|
+
]
|
|
22
|
+
|
|
17
23
|
|
|
18
24
|
field :active, 'bool'
|
|
25
|
+
field :blocked_event_types, { list: 'string' }
|
|
26
|
+
field :blocked_websites, { list: 'string' }
|
|
19
27
|
field :browser_agent, { list: 'string' }
|
|
20
28
|
field :cloud_provider, 'string'
|
|
21
29
|
field :cloud_region, 'string'
|
|
22
30
|
field :destination_id, 'string'
|
|
23
31
|
field :endpoint, 'string'
|
|
32
|
+
field :event_enrichment_state, 'string'
|
|
24
33
|
field :fallback_domain, 'string'
|
|
25
34
|
field :first_party_domain, 'string'
|
|
26
35
|
field :host_business_id, 'string'
|
|
@@ -747,7 +747,6 @@ module FacebookAds
|
|
|
747
747
|
has_edge :conversations do |edge|
|
|
748
748
|
edge.get 'UnifiedThread' do |api|
|
|
749
749
|
api.has_param :folder, 'string'
|
|
750
|
-
api.has_param :is_owner, 'bool'
|
|
751
750
|
api.has_param :platform, { enum: -> { UnifiedThread::PLATFORM }}
|
|
752
751
|
api.has_param :tags, { list: 'string' }
|
|
753
752
|
api.has_param :user_id, 'string'
|
|
@@ -1477,7 +1476,6 @@ module FacebookAds
|
|
|
1477
1476
|
has_edge :threads do |edge|
|
|
1478
1477
|
edge.get 'UnifiedThread' do |api|
|
|
1479
1478
|
api.has_param :folder, 'string'
|
|
1480
|
-
api.has_param :is_owner, 'bool'
|
|
1481
1479
|
api.has_param :platform, { enum: -> { UnifiedThread::PLATFORM }}
|
|
1482
1480
|
api.has_param :tags, { list: 'string' }
|
|
1483
1481
|
api.has_param :user_id, 'string'
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
# All rights reserved.
|
|
3
|
+
|
|
4
|
+
# This source code is licensed under the license found in the
|
|
5
|
+
# LICENSE file in the root directory of this source tree.
|
|
6
|
+
|
|
7
|
+
# FB:AUTOGEN
|
|
8
|
+
|
|
9
|
+
module FacebookAds
|
|
10
|
+
# This class is auto-generated.
|
|
11
|
+
|
|
12
|
+
# For any issues or feature requests related to this class, please let us know
|
|
13
|
+
# on github and we'll fix in our codegen framework. We'll not be able to accept
|
|
14
|
+
# pull request for this class.
|
|
15
|
+
|
|
16
|
+
class PlacementSoftOptOut < AdObject
|
|
17
|
+
|
|
18
|
+
field :audience_network_positions, { list: 'string' }
|
|
19
|
+
field :facebook_positions, { list: 'string' }
|
|
20
|
+
field :instagram_positions, { list: 'string' }
|
|
21
|
+
field :messenger_positions, { list: 'string' }
|
|
22
|
+
field :oculus_positions, { list: 'string' }
|
|
23
|
+
field :threads_positions, { list: 'string' }
|
|
24
|
+
field :whatsapp_positions, { list: 'string' }
|
|
25
|
+
has_no_id
|
|
26
|
+
has_no_get
|
|
27
|
+
has_no_post
|
|
28
|
+
has_no_delete
|
|
29
|
+
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -420,6 +420,7 @@ module FacebookAds
|
|
|
420
420
|
api.has_param :schedule, 'string'
|
|
421
421
|
api.has_param :selected_override_fields, { list: 'string' }
|
|
422
422
|
api.has_param :update_schedule, 'string'
|
|
423
|
+
api.has_param :use_case, { enum: -> { ProductFeed::USE_CASE }}
|
|
423
424
|
end
|
|
424
425
|
end
|
|
425
426
|
|
|
@@ -466,6 +467,7 @@ module FacebookAds
|
|
|
466
467
|
api.has_param :additional_image_urls, { list: 'string' }
|
|
467
468
|
api.has_param :additional_variant_attributes, 'hash'
|
|
468
469
|
api.has_param :age_group, { enum: -> { ProductItem::AGE_GROUP }}
|
|
470
|
+
api.has_param :allow_upsert, 'bool'
|
|
469
471
|
api.has_param :android_app_name, 'string'
|
|
470
472
|
api.has_param :android_class, 'string'
|
|
471
473
|
api.has_param :android_package, 'string'
|
|
@@ -102,6 +102,10 @@ module FacebookAds
|
|
|
102
102
|
"VERSION",
|
|
103
103
|
]
|
|
104
104
|
|
|
105
|
+
USE_CASE = [
|
|
106
|
+
"CREATOR_ASSET",
|
|
107
|
+
]
|
|
108
|
+
|
|
105
109
|
|
|
106
110
|
field :country, 'string'
|
|
107
111
|
field :created_time, 'datetime'
|
|
@@ -128,6 +132,7 @@ module FacebookAds
|
|
|
128
132
|
field :primary_feed_ids, { list: 'string' }
|
|
129
133
|
field :rules, { list: 'string' }
|
|
130
134
|
field :selected_override_fields, { list: 'string' }
|
|
135
|
+
field :use_case, { enum: -> { USE_CASE }}
|
|
131
136
|
|
|
132
137
|
has_edge :automotive_models do |edge|
|
|
133
138
|
edge.get 'AutomotiveModel' do |api|
|
|
@@ -472,6 +472,7 @@ module FacebookAds
|
|
|
472
472
|
"VIDEO_FETCH_FAILED_FORBIDDEN",
|
|
473
473
|
"VIDEO_FETCH_FAILED_LINK_BROKEN",
|
|
474
474
|
"VIDEO_FETCH_FAILED_TIMED_OUT",
|
|
475
|
+
"VIDEO_ISSUE_GENERIC",
|
|
475
476
|
"VIDEO_NOT_DOWNLOADABLE",
|
|
476
477
|
"WHATSAPP_DISABLED_BY_USER",
|
|
477
478
|
"WHATSAPP_MARKETING_MESSAGE_DISABLED_BY_USER",
|
|
@@ -833,6 +834,7 @@ module FacebookAds
|
|
|
833
834
|
field :videos, { list: 'ProductItemVideoData' }
|
|
834
835
|
field :visibility, { enum: -> { VISIBILITY }}
|
|
835
836
|
field :wa_compliance_category, 'string'
|
|
837
|
+
field :allow_upsert, 'bool'
|
|
836
838
|
field :android_app_name, 'string'
|
|
837
839
|
field :android_class, 'string'
|
|
838
840
|
field :android_package, 'string'
|
|
@@ -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_relative './attribution_setting'
|
|
20
|
+
|
|
19
21
|
module FacebookAds
|
|
20
22
|
module ServerSide
|
|
21
23
|
|
|
@@ -49,6 +51,30 @@ module FacebookAds
|
|
|
49
51
|
# The share of value generated by this click-conversion pair that is attributed to Meta.
|
|
50
52
|
attr_accessor :attribution_value
|
|
51
53
|
|
|
54
|
+
# The attribution source to differentiate the source of the data, e.g. whether this is from AMM or Custom Attribution or any other sources.
|
|
55
|
+
attr_accessor :attribution_source
|
|
56
|
+
|
|
57
|
+
# The engagement type that caused the original credited conversion.
|
|
58
|
+
attr_accessor :touchpoint_type
|
|
59
|
+
|
|
60
|
+
# The time when the touchpoint event occurred with the ad that the install was credited to.
|
|
61
|
+
attr_accessor :touchpoint_ts
|
|
62
|
+
|
|
63
|
+
# The attribution method used to attribute the event.
|
|
64
|
+
attr_accessor :attribution_method
|
|
65
|
+
|
|
66
|
+
# The decline reason for the attribution.
|
|
67
|
+
attr_accessor :decline_reason
|
|
68
|
+
|
|
69
|
+
# The auditing token for the attribution.
|
|
70
|
+
attr_accessor :auditing_token
|
|
71
|
+
|
|
72
|
+
# The linkage key for the attribution.
|
|
73
|
+
attr_accessor :linkage_key
|
|
74
|
+
|
|
75
|
+
# The attribution setting for the attribution.
|
|
76
|
+
attr_accessor :attribution_setting
|
|
77
|
+
|
|
52
78
|
|
|
53
79
|
|
|
54
80
|
# @param [String] scope
|
|
@@ -60,7 +86,15 @@ module FacebookAds
|
|
|
60
86
|
# @param [String] attribution_model
|
|
61
87
|
# @param [String] attr_window
|
|
62
88
|
# @param [Float] attribution_value
|
|
63
|
-
|
|
89
|
+
# @param [String] attribution_source
|
|
90
|
+
# @param [String] touchpoint_type
|
|
91
|
+
# @param [Integer] touchpoint_ts
|
|
92
|
+
# @param [String] attribution_method
|
|
93
|
+
# @param [String] decline_reason
|
|
94
|
+
# @param [String] auditing_token
|
|
95
|
+
# @param [String] linkage_key
|
|
96
|
+
# @param [FacebookAds::ServerSide::AttributionSetting] attribution_setting
|
|
97
|
+
def initialize(scope: nil, visit_time: nil, ad_id: nil, adset_id: nil, campaign_id: nil, attribution_share: nil, attribution_model: nil, attr_window: nil, attribution_value: nil, attribution_source: nil, touchpoint_type: nil, touchpoint_ts: nil, attribution_method: nil, decline_reason: nil, auditing_token: nil, linkage_key: nil, attribution_setting: nil)
|
|
64
98
|
unless scope.nil?
|
|
65
99
|
self.scope = scope
|
|
66
100
|
end
|
|
@@ -88,6 +122,30 @@ module FacebookAds
|
|
|
88
122
|
unless attribution_value.nil?
|
|
89
123
|
self.attribution_value = attribution_value
|
|
90
124
|
end
|
|
125
|
+
unless attribution_source.nil?
|
|
126
|
+
self.attribution_source = attribution_source
|
|
127
|
+
end
|
|
128
|
+
unless touchpoint_type.nil?
|
|
129
|
+
self.touchpoint_type = touchpoint_type
|
|
130
|
+
end
|
|
131
|
+
unless touchpoint_ts.nil?
|
|
132
|
+
self.touchpoint_ts = touchpoint_ts
|
|
133
|
+
end
|
|
134
|
+
unless attribution_method.nil?
|
|
135
|
+
self.attribution_method = attribution_method
|
|
136
|
+
end
|
|
137
|
+
unless decline_reason.nil?
|
|
138
|
+
self.decline_reason = decline_reason
|
|
139
|
+
end
|
|
140
|
+
unless auditing_token.nil?
|
|
141
|
+
self.auditing_token = auditing_token
|
|
142
|
+
end
|
|
143
|
+
unless linkage_key.nil?
|
|
144
|
+
self.linkage_key = linkage_key
|
|
145
|
+
end
|
|
146
|
+
unless attribution_setting.nil?
|
|
147
|
+
self.attribution_setting = attribution_setting
|
|
148
|
+
end
|
|
91
149
|
end
|
|
92
150
|
|
|
93
151
|
# build the object using the input hash
|
|
@@ -131,7 +189,39 @@ module FacebookAds
|
|
|
131
189
|
end
|
|
132
190
|
|
|
133
191
|
if attributes.has_key?(:'attribution_value')
|
|
134
|
-
self.
|
|
192
|
+
self.attribution_value = attributes[:'attribution_value']
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
if attributes.has_key?(:'attribution_source')
|
|
196
|
+
self.attribution_source = attributes[:'attribution_source']
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
if attributes.has_key?(:'touchpoint_type')
|
|
200
|
+
self.touchpoint_type = attributes[:'touchpoint_type']
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
if attributes.has_key?(:'touchpoint_ts')
|
|
204
|
+
self.touchpoint_ts = attributes[:'touchpoint_ts']
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
if attributes.has_key?(:'attribution_method')
|
|
208
|
+
self.attribution_method = attributes[:'attribution_method']
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
if attributes.has_key?(:'decline_reason')
|
|
212
|
+
self.decline_reason = attributes[:'decline_reason']
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
if attributes.has_key?(:'auditing_token')
|
|
216
|
+
self.auditing_token = attributes[:'auditing_token']
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
if attributes.has_key?(:'linkage_key')
|
|
220
|
+
self.linkage_key = attributes[:'linkage_key']
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
if attributes.has_key?(:'attribution_setting')
|
|
224
|
+
self.attribution_setting = attributes[:'attribution_setting']
|
|
135
225
|
end
|
|
136
226
|
end
|
|
137
227
|
|
|
@@ -147,7 +237,15 @@ module FacebookAds
|
|
|
147
237
|
attribution_share == o.attribution_share &&
|
|
148
238
|
attribution_model == o.attribution_model &&
|
|
149
239
|
attr_window == o.attr_window &&
|
|
150
|
-
attribution_value == o.attribution_value
|
|
240
|
+
attribution_value == o.attribution_value &&
|
|
241
|
+
attribution_source == o.attribution_source &&
|
|
242
|
+
touchpoint_type == o.touchpoint_type &&
|
|
243
|
+
touchpoint_ts == o.touchpoint_ts &&
|
|
244
|
+
attribution_method == o.attribution_method &&
|
|
245
|
+
decline_reason == o.decline_reason &&
|
|
246
|
+
auditing_token == o.auditing_token &&
|
|
247
|
+
linkage_key == o.linkage_key &&
|
|
248
|
+
attribution_setting == o.attribution_setting
|
|
151
249
|
end
|
|
152
250
|
|
|
153
251
|
# @see the `==` method
|
|
@@ -159,7 +257,7 @@ module FacebookAds
|
|
|
159
257
|
# @return [Fixnum] Hash code
|
|
160
258
|
def hash
|
|
161
259
|
[
|
|
162
|
-
scope, visit_time, ad_id, adset_id, campaign_id, attribution_share, attribution_model, attr_window, attribution_value
|
|
260
|
+
scope, visit_time, ad_id, adset_id, campaign_id, attribution_share, attribution_model, attr_window, attribution_value, attribution_source, touchpoint_type, touchpoint_ts, attribution_method, decline_reason, auditing_token, linkage_key, attribution_setting
|
|
163
261
|
].hash
|
|
164
262
|
end
|
|
165
263
|
|
|
@@ -192,6 +290,30 @@ module FacebookAds
|
|
|
192
290
|
unless attribution_value.nil?
|
|
193
291
|
hash['attribution_value'] = attribution_value
|
|
194
292
|
end
|
|
293
|
+
unless attribution_source.nil?
|
|
294
|
+
hash['attribution_source'] = attribution_source
|
|
295
|
+
end
|
|
296
|
+
unless touchpoint_type.nil?
|
|
297
|
+
hash['touchpoint_type'] = touchpoint_type
|
|
298
|
+
end
|
|
299
|
+
unless touchpoint_ts.nil?
|
|
300
|
+
hash['touchpoint_ts'] = touchpoint_ts
|
|
301
|
+
end
|
|
302
|
+
unless attribution_method.nil?
|
|
303
|
+
hash['attribution_method'] = attribution_method
|
|
304
|
+
end
|
|
305
|
+
unless decline_reason.nil?
|
|
306
|
+
hash['decline_reason'] = decline_reason
|
|
307
|
+
end
|
|
308
|
+
unless auditing_token.nil?
|
|
309
|
+
hash['auditing_token'] = auditing_token
|
|
310
|
+
end
|
|
311
|
+
unless linkage_key.nil?
|
|
312
|
+
hash['linkage_key'] = linkage_key
|
|
313
|
+
end
|
|
314
|
+
unless attribution_setting.nil?
|
|
315
|
+
hash['attribution_setting'] = attribution_setting
|
|
316
|
+
end
|
|
195
317
|
hash.to_s
|
|
196
318
|
end
|
|
197
319
|
|
|
@@ -226,6 +348,30 @@ module FacebookAds
|
|
|
226
348
|
unless attribution_value.nil?
|
|
227
349
|
hash['attribution_value'] = attribution_value
|
|
228
350
|
end
|
|
351
|
+
unless attribution_source.nil?
|
|
352
|
+
hash['attribution_source'] = attribution_source
|
|
353
|
+
end
|
|
354
|
+
unless touchpoint_type.nil?
|
|
355
|
+
hash['touchpoint_type'] = touchpoint_type
|
|
356
|
+
end
|
|
357
|
+
unless touchpoint_ts.nil?
|
|
358
|
+
hash['touchpoint_ts'] = touchpoint_ts
|
|
359
|
+
end
|
|
360
|
+
unless attribution_method.nil?
|
|
361
|
+
hash['attribution_method'] = FacebookAds::ServerSide::Util.normalize_attribution_method(attribution_method)
|
|
362
|
+
end
|
|
363
|
+
unless decline_reason.nil?
|
|
364
|
+
hash['decline_reason'] = FacebookAds::ServerSide::Util.normalize_decline_reason(decline_reason)
|
|
365
|
+
end
|
|
366
|
+
unless auditing_token.nil?
|
|
367
|
+
hash['auditing_token'] = auditing_token
|
|
368
|
+
end
|
|
369
|
+
unless linkage_key.nil?
|
|
370
|
+
hash['linkage_key'] = linkage_key
|
|
371
|
+
end
|
|
372
|
+
unless attribution_setting.nil?
|
|
373
|
+
hash['attribution_setting'] = attribution_setting.normalize
|
|
374
|
+
end
|
|
229
375
|
hash
|
|
230
376
|
end
|
|
231
377
|
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
module FacebookAds
|
|
20
|
+
module ServerSide
|
|
21
|
+
AttributionMethod = Set[
|
|
22
|
+
'ard',
|
|
23
|
+
'deeplink',
|
|
24
|
+
'gpir',
|
|
25
|
+
'invalid_response',
|
|
26
|
+
'mir',
|
|
27
|
+
'srn'
|
|
28
|
+
]
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,107 @@
|
|
|
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
|
+
module FacebookAds
|
|
20
|
+
module ServerSide
|
|
21
|
+
|
|
22
|
+
# AttributionSetting contains attribution window settings used for attribution.
|
|
23
|
+
class AttributionSetting
|
|
24
|
+
|
|
25
|
+
# Inactivity window in hours.
|
|
26
|
+
attr_accessor :inactivity_window_hours
|
|
27
|
+
|
|
28
|
+
# Reattribution window in hours.
|
|
29
|
+
attr_accessor :reattribution_window_hours
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
# @param [Integer] inactivity_window_hours
|
|
33
|
+
# @param [Integer] reattribution_window_hours
|
|
34
|
+
def initialize(inactivity_window_hours: nil, reattribution_window_hours: nil)
|
|
35
|
+
unless inactivity_window_hours.nil?
|
|
36
|
+
self.inactivity_window_hours = inactivity_window_hours
|
|
37
|
+
end
|
|
38
|
+
unless reattribution_window_hours.nil?
|
|
39
|
+
self.reattribution_window_hours = reattribution_window_hours
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# build the object using the input hash
|
|
44
|
+
# @param [Hash] attributes attributes in the form of hash
|
|
45
|
+
def build(attributes = {})
|
|
46
|
+
return unless attributes.is_a?(Hash)
|
|
47
|
+
|
|
48
|
+
# convert string to symbol for hash key
|
|
49
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
50
|
+
|
|
51
|
+
if attributes.has_key?(:'inactivity_window_hours')
|
|
52
|
+
self.inactivity_window_hours = attributes[:'inactivity_window_hours']
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
if attributes.has_key?(:'reattribution_window_hours')
|
|
56
|
+
self.reattribution_window_hours = attributes[:'reattribution_window_hours']
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Checks equality by comparing each attribute.
|
|
61
|
+
def ==(o)
|
|
62
|
+
return true if self.equal?(o)
|
|
63
|
+
self.class == o.class &&
|
|
64
|
+
inactivity_window_hours == o.inactivity_window_hours &&
|
|
65
|
+
reattribution_window_hours == o.reattribution_window_hours
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# @see the `==` method
|
|
69
|
+
def eql?(o)
|
|
70
|
+
self == o
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Calculates hash code according to all attributes.
|
|
74
|
+
# @return [Fixnum] Hash code
|
|
75
|
+
def hash
|
|
76
|
+
[
|
|
77
|
+
inactivity_window_hours, reattribution_window_hours
|
|
78
|
+
].hash
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
def to_s
|
|
82
|
+
hash = {}
|
|
83
|
+
unless inactivity_window_hours.nil?
|
|
84
|
+
hash['inactivity_window_hours'] = inactivity_window_hours
|
|
85
|
+
end
|
|
86
|
+
unless reattribution_window_hours.nil?
|
|
87
|
+
hash['reattribution_window_hours'] = reattribution_window_hours
|
|
88
|
+
end
|
|
89
|
+
hash.to_s
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
# Normalize input fields to server request format.
|
|
94
|
+
def normalize
|
|
95
|
+
hash = {}
|
|
96
|
+
unless inactivity_window_hours.nil?
|
|
97
|
+
hash['inactivity_window_hours'] = inactivity_window_hours
|
|
98
|
+
end
|
|
99
|
+
unless reattribution_window_hours.nil?
|
|
100
|
+
hash['reattribution_window_hours'] = reattribution_window_hours
|
|
101
|
+
end
|
|
102
|
+
hash
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
module FacebookAds
|
|
20
|
+
module ServerSide
|
|
21
|
+
DeclineReason = Set[
|
|
22
|
+
'attribute_to_other_source',
|
|
23
|
+
'out_of_lookback_window',
|
|
24
|
+
'view_through_disabled',
|
|
25
|
+
'within_inactive_window',
|
|
26
|
+
'inactive',
|
|
27
|
+
'fraud_detected',
|
|
28
|
+
'unknown',
|
|
29
|
+
'reinstall_attribution_disabled',
|
|
30
|
+
'lookback',
|
|
31
|
+
'not_pmod_match',
|
|
32
|
+
'validation_rule_detected',
|
|
33
|
+
'preload_install',
|
|
34
|
+
'min_time_between_re_engagements',
|
|
35
|
+
'duplicated',
|
|
36
|
+
'pmod_disabled'
|
|
37
|
+
]
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -318,6 +318,30 @@ module FacebookAds
|
|
|
318
318
|
|
|
319
319
|
action_source
|
|
320
320
|
end
|
|
321
|
+
|
|
322
|
+
# Normalizes the input attribution_method and returns valid value (or throw exception if invalid).
|
|
323
|
+
def self.normalize_attribution_method(attribution_method)
|
|
324
|
+
unless FacebookAds::ServerSide::AttributionMethod.include?(attribution_method)
|
|
325
|
+
values = FacebookAds::ServerSide::AttributionMethod.to_a.join(',')
|
|
326
|
+
raise ArgumentError.new(
|
|
327
|
+
"Invalid attribution_method passed: #{attribution_method}. Please use one of the defined values: #{values}"
|
|
328
|
+
)
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
attribution_method
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
# Normalizes the input decline_reason and returns valid value (or throw exception if invalid).
|
|
335
|
+
def self.normalize_decline_reason(decline_reason)
|
|
336
|
+
unless FacebookAds::ServerSide::DeclineReason.include?(decline_reason)
|
|
337
|
+
values = FacebookAds::ServerSide::DeclineReason.to_a.join(',')
|
|
338
|
+
raise ArgumentError.new(
|
|
339
|
+
"Invalid decline_reason passed: #{decline_reason}. Please use one of the defined values: #{values}"
|
|
340
|
+
)
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
decline_reason
|
|
344
|
+
end
|
|
321
345
|
end
|
|
322
346
|
end
|
|
323
347
|
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
# All rights reserved.
|
|
3
|
+
|
|
4
|
+
# This source code is licensed under the license found in the
|
|
5
|
+
# LICENSE file in the root directory of this source tree.
|
|
6
|
+
|
|
7
|
+
# FB:AUTOGEN
|
|
8
|
+
|
|
9
|
+
module FacebookAds
|
|
10
|
+
# This class is auto-generated.
|
|
11
|
+
|
|
12
|
+
# For any issues or feature requests related to this class, please let us know
|
|
13
|
+
# on github and we'll fix in our codegen framework. We'll not be able to accept
|
|
14
|
+
# pull request for this class.
|
|
15
|
+
|
|
16
|
+
class ShadowIgScheduledMedia < AdObject
|
|
17
|
+
|
|
18
|
+
field :caption, 'string'
|
|
19
|
+
field :id, 'string'
|
|
20
|
+
field :media_type, 'string'
|
|
21
|
+
field :media_url, 'string'
|
|
22
|
+
field :publish_timestamp, 'int'
|
|
23
|
+
field :thumbnail_url, 'string'
|
|
24
|
+
has_no_post
|
|
25
|
+
has_no_delete
|
|
26
|
+
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
# All rights reserved.
|
|
3
|
+
|
|
4
|
+
# This source code is licensed under the license found in the
|
|
5
|
+
# LICENSE file in the root directory of this source tree.
|
|
6
|
+
|
|
7
|
+
# FB:AUTOGEN
|
|
8
|
+
|
|
9
|
+
module FacebookAds
|
|
10
|
+
# This class is auto-generated.
|
|
11
|
+
|
|
12
|
+
# For any issues or feature requests related to this class, please let us know
|
|
13
|
+
# on github and we'll fix in our codegen framework. We'll not be able to accept
|
|
14
|
+
# pull request for this class.
|
|
15
|
+
|
|
16
|
+
class ShadowIgUserThreadOwner < AdObject
|
|
17
|
+
|
|
18
|
+
has_no_id
|
|
19
|
+
has_no_get
|
|
20
|
+
has_no_post
|
|
21
|
+
has_no_delete
|
|
22
|
+
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -216,7 +216,6 @@ module FacebookAds
|
|
|
216
216
|
has_edge :conversations do |edge|
|
|
217
217
|
edge.get 'UnifiedThread' do |api|
|
|
218
218
|
api.has_param :folder, 'string'
|
|
219
|
-
api.has_param :is_owner, 'bool'
|
|
220
219
|
api.has_param :platform, { enum: -> { UnifiedThread::PLATFORM }}
|
|
221
220
|
api.has_param :tags, { list: 'string' }
|
|
222
221
|
api.has_param :user_id, 'string'
|