facebookbusiness 23.0.3 → 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.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/lib/facebook_ads/ad_objects/ad_account.rb +4 -0
  3. data/lib/facebook_ads/ad_objects/ad_account_ad_volume.rb +17 -0
  4. data/lib/facebook_ads/ad_objects/ad_account_live_video_advertiser.rb +1 -0
  5. data/lib/facebook_ads/ad_objects/ad_account_matched_search_applications_edge_data.rb +2 -0
  6. data/lib/facebook_ads/ad_objects/ad_account_targeting_unified.rb +1 -0
  7. data/lib/facebook_ads/ad_objects/ad_creative.rb +5 -0
  8. data/lib/facebook_ads/ad_objects/ad_creative_destination_spec.rb +1 -0
  9. data/lib/facebook_ads/ad_objects/ad_creative_feature_customizations.rb +1 -0
  10. data/lib/facebook_ads/ad_objects/ad_creative_features_spec.rb +4 -0
  11. data/lib/facebook_ads/ad_objects/ad_creative_link_data_child_attachment.rb +1 -0
  12. data/lib/facebook_ads/ad_objects/ad_creative_media_sourcing_spec.rb +1 -0
  13. data/lib/facebook_ads/ad_objects/ad_creative_site_links_spec.rb +2 -0
  14. data/lib/facebook_ads/ad_objects/ad_preview.rb +0 -1
  15. data/lib/facebook_ads/ad_objects/ad_promoted_object.rb +1 -0
  16. data/lib/facebook_ads/ad_objects/ad_set.rb +3 -1
  17. data/lib/facebook_ads/ad_objects/ad_video.rb +1 -4
  18. data/lib/facebook_ads/ad_objects/ads_image_crops.rb +1 -0
  19. data/lib/facebook_ads/ad_objects/ads_insights.rb +2 -0
  20. data/lib/facebook_ads/ad_objects/ads_quick_views.rb +1 -0
  21. data/lib/facebook_ads/ad_objects/ads_user_settings.rb +5 -0
  22. data/lib/facebook_ads/ad_objects/ads_value_adjustment_rule_collection.rb +1 -1
  23. data/lib/facebook_ads/ad_objects/application.rb +0 -8
  24. data/lib/facebook_ads/ad_objects/branded_content_shadow_ig_media_id.rb +2 -0
  25. data/lib/facebook_ads/ad_objects/business.rb +13 -5
  26. data/lib/facebook_ads/ad_objects/commerce_merchant_settings.rb +0 -4
  27. data/lib/facebook_ads/ad_objects/copyright_ownership_transfer.rb +1 -0
  28. data/lib/facebook_ads/ad_objects/custom_audience.rb +1 -0
  29. data/lib/facebook_ads/ad_objects/event.rb +0 -1
  30. data/lib/facebook_ads/ad_objects/ig_media.rb +2 -1
  31. data/lib/facebook_ads/ad_objects/ig_user.rb +10 -0
  32. data/lib/facebook_ads/ad_objects/ig_user_for_ig_only_api.rb +1 -1
  33. data/lib/facebook_ads/ad_objects/live_video.rb +0 -1
  34. data/lib/facebook_ads/ad_objects/mc_experience_config_for_api.rb +1 -0
  35. data/lib/facebook_ads/ad_objects/omega_customer_trx.rb +0 -5
  36. data/lib/facebook_ads/ad_objects/open_bridge_configuration.rb +9 -0
  37. data/lib/facebook_ads/ad_objects/page.rb +0 -2
  38. data/lib/facebook_ads/ad_objects/placement_soft_opt_out.rb +31 -0
  39. data/lib/facebook_ads/ad_objects/product_catalog.rb +2 -0
  40. data/lib/facebook_ads/ad_objects/product_feed.rb +5 -0
  41. data/lib/facebook_ads/ad_objects/product_item.rb +2 -0
  42. data/lib/facebook_ads/ad_objects/server_side/attribution_data.rb +95 -3
  43. data/lib/facebook_ads/ad_objects/server_side/attribution_method.rb +30 -0
  44. data/lib/facebook_ads/ad_objects/server_side/attribution_setting.rb +107 -0
  45. data/lib/facebook_ads/ad_objects/server_side/decline_reason.rb +39 -0
  46. data/lib/facebook_ads/ad_objects/server_side/util.rb +24 -0
  47. data/lib/facebook_ads/ad_objects/shadow_ig_scheduled_media.rb +28 -0
  48. data/lib/facebook_ads/ad_objects/shadow_ig_user_thread_owner.rb +24 -0
  49. data/lib/facebook_ads/ad_objects/user.rb +0 -1
  50. data/lib/facebook_ads/ad_objects/whats_app_business_account.rb +18 -2
  51. data/lib/facebook_ads/version.rb +2 -2
  52. metadata +8 -3
  53. data/lib/facebook_ads/ad_objects/audio_release.rb +0 -38
@@ -14,11 +14,6 @@ module FacebookAds
14
14
  # pull request for this class.
15
15
 
16
16
  class OmegaCustomerTrx < AdObject
17
- PRODUCT_TYPES = [
18
- "FACEBOOK",
19
- "WHATSAPP",
20
- ]
21
-
22
17
  TYPE = [
23
18
  "CM",
24
19
  "DM",
@@ -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
 
@@ -58,6 +60,21 @@ module FacebookAds
58
60
  # The time when the touchpoint event occurred with the ad that the install was credited to.
59
61
  attr_accessor :touchpoint_ts
60
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
+
61
78
 
62
79
 
63
80
  # @param [String] scope
@@ -72,7 +89,12 @@ module FacebookAds
72
89
  # @param [String] attribution_source
73
90
  # @param [String] touchpoint_type
74
91
  # @param [Integer] touchpoint_ts
75
- 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)
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)
76
98
  unless scope.nil?
77
99
  self.scope = scope
78
100
  end
@@ -109,6 +131,21 @@ module FacebookAds
109
131
  unless touchpoint_ts.nil?
110
132
  self.touchpoint_ts = touchpoint_ts
111
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
112
149
  end
113
150
 
114
151
  # build the object using the input hash
@@ -166,6 +203,26 @@ module FacebookAds
166
203
  if attributes.has_key?(:'touchpoint_ts')
167
204
  self.touchpoint_ts = attributes[:'touchpoint_ts']
168
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']
225
+ end
169
226
  end
170
227
 
171
228
  # Checks equality by comparing each attribute.
@@ -183,7 +240,12 @@ module FacebookAds
183
240
  attribution_value == o.attribution_value &&
184
241
  attribution_source == o.attribution_source &&
185
242
  touchpoint_type == o.touchpoint_type &&
186
- touchpoint_ts == o.touchpoint_ts
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
187
249
  end
188
250
 
189
251
  # @see the `==` method
@@ -195,7 +257,7 @@ module FacebookAds
195
257
  # @return [Fixnum] Hash code
196
258
  def hash
197
259
  [
198
- scope, visit_time, ad_id, adset_id, campaign_id, attribution_share, attribution_model, attr_window, attribution_value, attribution_source, touchpoint_type, touchpoint_ts
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
199
261
  ].hash
200
262
  end
201
263
 
@@ -237,6 +299,21 @@ module FacebookAds
237
299
  unless touchpoint_ts.nil?
238
300
  hash['touchpoint_ts'] = touchpoint_ts
239
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
240
317
  hash.to_s
241
318
  end
242
319
 
@@ -280,6 +357,21 @@ module FacebookAds
280
357
  unless touchpoint_ts.nil?
281
358
  hash['touchpoint_ts'] = touchpoint_ts
282
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
283
375
  hash
284
376
  end
285
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'
@@ -27,6 +27,15 @@ module FacebookAds
27
27
  "verified",
28
28
  ]
29
29
 
30
+ WHATSAPP_BUSINESS_MANAGER_MESSAGING_LIMIT = [
31
+ "TIER_100K",
32
+ "TIER_10K",
33
+ "TIER_250",
34
+ "TIER_2K",
35
+ "TIER_UNLIMITED",
36
+ "UNTIERED",
37
+ ]
38
+
30
39
  TASKS = [
31
40
  "DEVELOP",
32
41
  "MANAGE",
@@ -105,6 +114,7 @@ module FacebookAds
105
114
  field :purchase_order_number, 'string'
106
115
  field :status, 'string'
107
116
  field :timezone_id, 'string'
117
+ field :whatsapp_business_manager_messaging_limit, { enum: -> { WHATSAPP_BUSINESS_MANAGER_MESSAGING_LIMIT }}
108
118
  has_no_delete
109
119
 
110
120
  has_edge :activities do |edge|
@@ -164,6 +174,10 @@ module FacebookAds
164
174
  end
165
175
  end
166
176
 
177
+ has_edge :degrees_of_freedom_spec do |edge|
178
+ edge.get
179
+ end
180
+
167
181
  has_edge :flows do |edge|
168
182
  edge.get
169
183
  edge.post do |api|
@@ -240,6 +254,7 @@ module FacebookAds
240
254
  api.has_param :bid_spec, 'hash'
241
255
  api.has_param :category, { enum: -> { WhatsAppBusinessAccount::CATEGORY }}
242
256
  api.has_param :components, { list: 'hash' }
257
+ api.has_param :creative_sourcing_spec, 'hash'
243
258
  api.has_param :cta_url_link_tracking_opted_out, 'bool'
244
259
  api.has_param :degrees_of_freedom_spec, 'hash'
245
260
  api.has_param :display_format, { enum: -> { WhatsAppBusinessAccount::DISPLAY_FORMAT }}
@@ -363,7 +378,7 @@ module FacebookAds
363
378
  edge.get do |api|
364
379
  api.has_param :end, 'datetime'
365
380
  api.has_param :granularity, { enum: %w{DAILY }}
366
- api.has_param :metric_types, { list: { enum: %w{CLICKED COST DELIVERED READ REPLIED SENT }} }
381
+ api.has_param :metric_types, { list: { enum: %w{APP_ACTIVATIONS APP_ADD_TO_CART APP_CHECKOUTS_INITIATED APP_PURCHASES APP_PURCHASES_CONVERSION_VALUE CLICKED COST DELIVERED READ REPLIED SENT WEBSITE_ADD_TO_CART WEBSITE_CHECKOUTS_INITIATED WEBSITE_PURCHASES WEBSITE_PURCHASES_CONVERSION_VALUE }} }
367
382
  api.has_param :product_type, { enum: %w{CLOUD_API MARKETING_MESSAGES_LITE_API }}
368
383
  api.has_param :start, 'datetime'
369
384
  api.has_param :template_ids, { list: 'string' }
@@ -375,9 +390,10 @@ module FacebookAds
375
390
  edge.get do |api|
376
391
  api.has_param :end, 'datetime'
377
392
  api.has_param :granularity, { enum: %w{DAILY }}
378
- api.has_param :metric_types, { list: { enum: %w{CLICKED COST DELIVERED READ REPLIED SENT }} }
393
+ api.has_param :metric_types, { list: { enum: %w{APP_ACTIVATIONS APP_ADD_TO_CART APP_CHECKOUTS_INITIATED APP_PURCHASES APP_PURCHASES_CONVERSION_VALUE CLICKED COST DELIVERED READ REPLIED SENT WEBSITE_ADD_TO_CART WEBSITE_CHECKOUTS_INITIATED WEBSITE_PURCHASES WEBSITE_PURCHASES_CONVERSION_VALUE }} }
379
394
  api.has_param :start, 'datetime'
380
395
  api.has_param :template_group_ids, { list: 'string' }
396
+ api.has_param :use_waba_timezone, 'bool'
381
397
  end
382
398
  end
383
399
 
@@ -7,6 +7,6 @@
7
7
  # FB:AUTOGEN
8
8
 
9
9
  module FacebookAds
10
- VERSION = '23.0.3'
11
- API_VERSION = '23.0'
10
+ VERSION = '24.0.1'
11
+ API_VERSION = '24.0'
12
12
  end