facebookbusiness 19.0.0 → 19.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/lib/facebook_ads/ad_objects/ad.rb +1 -1
  3. data/lib/facebook_ads/ad_objects/ad_account.rb +10 -0
  4. data/lib/facebook_ads/ad_objects/ad_account_ad_rules_history.rb +1 -0
  5. data/lib/facebook_ads/ad_objects/ad_account_ad_volume.rb +6 -0
  6. data/lib/facebook_ads/ad_objects/ad_account_delivery_estimate.rb +1 -0
  7. data/lib/facebook_ads/ad_objects/{page_about_story.rb → ad_asset_body.rb} +4 -7
  8. data/lib/facebook_ads/ad_objects/ad_asset_call_to_action_type.rb +25 -0
  9. data/lib/facebook_ads/ad_objects/ad_asset_description.rb +26 -0
  10. data/lib/facebook_ads/ad_objects/ad_asset_feed_spec.rb +1 -0
  11. data/lib/facebook_ads/ad_objects/ad_asset_image.rb +30 -0
  12. data/lib/facebook_ads/ad_objects/ad_asset_link_url.rb +32 -0
  13. data/lib/facebook_ads/ad_objects/ad_asset_title.rb +26 -0
  14. data/lib/facebook_ads/ad_objects/ad_asset_video.rb +34 -0
  15. data/lib/facebook_ads/ad_objects/ad_campaign_delivery_estimate.rb +1 -0
  16. data/lib/facebook_ads/ad_objects/ad_creative.rb +1 -0
  17. data/lib/facebook_ads/ad_objects/ad_creative_link_data_call_to_action.rb +1 -0
  18. data/lib/facebook_ads/ad_objects/ad_creative_promotion_metadata_spec.rb +30 -0
  19. data/lib/facebook_ads/ad_objects/ad_creative_site_links_spec.rb +26 -0
  20. data/lib/facebook_ads/ad_objects/ad_creative_sourcing_spec.rb +2 -0
  21. data/lib/facebook_ads/ad_objects/ad_preview.rb +4 -0
  22. data/lib/facebook_ads/ad_objects/ad_rule_history.rb +1 -0
  23. data/lib/facebook_ads/ad_objects/ad_set.rb +34 -20
  24. data/lib/facebook_ads/ad_objects/ad_video.rb +2 -1
  25. data/lib/facebook_ads/ad_objects/ads_insights.rb +6 -1
  26. data/lib/facebook_ads/ad_objects/ads_pixel.rb +0 -4
  27. data/lib/facebook_ads/ad_objects/analytics_segment.rb +39 -0
  28. data/lib/facebook_ads/ad_objects/branded_content_shadow_ig_media_id.rb +27 -0
  29. data/lib/facebook_ads/ad_objects/branded_content_shadow_ig_user_id.rb +24 -0
  30. data/lib/facebook_ads/ad_objects/business.rb +7 -0
  31. data/lib/facebook_ads/ad_objects/campaign.rb +2 -1
  32. data/lib/facebook_ads/ad_objects/commerce_merchant_settings.rb +0 -7
  33. data/lib/facebook_ads/ad_objects/commerce_order.rb +1 -0
  34. data/lib/facebook_ads/ad_objects/custom_audience_data_source.rb +1 -0
  35. data/lib/facebook_ads/ad_objects/group.rb +3 -3
  36. data/lib/facebook_ads/ad_objects/ig_media.rb +8 -0
  37. data/lib/facebook_ads/ad_objects/ig_user.rb +28 -0
  38. data/lib/facebook_ads/ad_objects/insights_result.rb +1 -1
  39. data/lib/facebook_ads/ad_objects/instagram_insights_result.rb +0 -5
  40. data/lib/facebook_ads/ad_objects/instagram_user.rb +4 -0
  41. data/lib/facebook_ads/ad_objects/page.rb +2 -2
  42. data/lib/facebook_ads/ad_objects/product_catalog.rb +8 -3
  43. data/lib/facebook_ads/ad_objects/product_feed.rb +1 -0
  44. data/lib/facebook_ads/ad_objects/product_group.rb +0 -3
  45. data/lib/facebook_ads/ad_objects/product_item.rb +20 -3
  46. data/lib/facebook_ads/ad_objects/server_side/action_source.rb +3 -0
  47. data/lib/facebook_ads/ad_objects/server_side/event.rb +22 -2
  48. data/lib/facebook_ads/ad_objects/server_side/messaging_channel.rb +27 -0
  49. data/lib/facebook_ads/ad_objects/server_side/user_data.rb +41 -3
  50. data/lib/facebook_ads/ad_objects/shop.rb +1 -0
  51. data/lib/facebook_ads/ad_objects/targeting.rb +2 -0
  52. data/lib/facebook_ads/ad_objects/targeting_automation.rb +27 -0
  53. data/lib/facebook_ads/ad_objects/whats_app_business_account.rb +3 -0
  54. data/lib/facebook_ads/ad_objects/whats_app_business_partner_client_verification_submission.rb +30 -0
  55. data/lib/facebook_ads/version.rb +1 -1
  56. metadata +17 -3
@@ -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 BrandedContentShadowIgUserId < AdObject
17
+
18
+ field :id, 'string'
19
+ has_no_get
20
+ has_no_post
21
+ has_no_delete
22
+
23
+ end
24
+ end
@@ -816,6 +816,7 @@ module FacebookAds
816
816
  has_edge :owned_product_catalogs do |edge|
817
817
  edge.get 'ProductCatalog'
818
818
  edge.post 'ProductCatalog' do |api|
819
+ api.has_param :additional_vertical_option, { enum: -> { ProductCatalog::ADDITIONAL_VERTICAL_OPTION }}
819
820
  api.has_param :catalog_segment_filter, 'object'
820
821
  api.has_param :catalog_segment_product_set_id, 'string'
821
822
  api.has_param :da_display_settings, 'object'
@@ -911,6 +912,12 @@ module FacebookAds
911
912
  end
912
913
  end
913
914
 
915
+ has_edge :self_certified_whatsapp_business_submissions do |edge|
916
+ edge.get 'WhatsAppBusinessPartnerClientVerificationSubmission' do |api|
917
+ api.has_param :end_business_id, 'string'
918
+ end
919
+ end
920
+
914
921
  has_edge :setup_managed_partner_adaccounts do |edge|
915
922
  edge.post 'Business' do |api|
916
923
  api.has_param :credit_line_id, 'string'
@@ -18,6 +18,7 @@ module FacebookAds
18
18
  "COST_CAP",
19
19
  "LOWEST_COST_WITHOUT_CAP",
20
20
  "LOWEST_COST_WITH_BID_CAP",
21
+ "LOWEST_COST_WITH_MIN_ROAS",
21
22
  ]
22
23
 
23
24
  CONFIGURED_STATUS = [
@@ -56,7 +57,7 @@ module FacebookAds
56
57
  "last_week_mon_sun",
57
58
  "last_week_sun_sat",
58
59
  "last_year",
59
- "maximum",
60
+ "lifetime",
60
61
  "this_month",
61
62
  "this_quarter",
62
63
  "this_week_mon_today",
@@ -74,13 +74,6 @@ module FacebookAds
74
74
  end
75
75
  end
76
76
 
77
- has_edge :onsite_conversion_events do |edge|
78
- edge.get do |api|
79
- api.has_param :created_after, 'datetime'
80
- api.has_param :created_before, 'datetime'
81
- end
82
- end
83
-
84
77
  has_edge :order_management_apps do |edge|
85
78
  edge.get 'Application'
86
79
  edge.post 'CommerceMerchantSettings'
@@ -105,6 +105,7 @@ module FacebookAds
105
105
  has_edge :refunds do |edge|
106
106
  edge.get
107
107
  edge.post 'CommerceOrder' do |api|
108
+ api.has_param :adjustment_amount, 'hash'
108
109
  api.has_param :deductions, { list: 'hash' }
109
110
  api.has_param :idempotency_key, 'string'
110
111
  api.has_param :items, { list: 'hash' }
@@ -74,6 +74,7 @@ module FacebookAds
74
74
  "WEB_PIXEL_COMBINATION_EVENTS",
75
75
  "WEB_PIXEL_HITS",
76
76
  "WEB_PIXEL_HITS_CUSTOM_AUDIENCE_USERS",
77
+ "WHATSAPP_SUBSCRIBER_POOL",
77
78
  ]
78
79
 
79
80
  TYPE = [
@@ -21,9 +21,9 @@ module FacebookAds
21
21
  ]
22
22
 
23
23
  POST_PERMISSIONS = [
24
- "0",
25
- "1",
26
- "2",
24
+ "ADMIN_ONLY",
25
+ "ANYONE",
26
+ "NONE",
27
27
  ]
28
28
 
29
29
  PURPOSE = [
@@ -34,6 +34,14 @@ module FacebookAds
34
34
  field :username, 'string'
35
35
  has_no_delete
36
36
 
37
+ has_edge :branded_content_partner_promote do |edge|
38
+ edge.get 'BrandedContentShadowIgUserId'
39
+ edge.post 'BrandedContentShadowIgUserId' do |api|
40
+ api.has_param :permission, 'bool'
41
+ api.has_param :sponsor_id, 'int'
42
+ end
43
+ end
44
+
37
45
  has_edge :children do |edge|
38
46
  edge.get 'IgMedia'
39
47
  end
@@ -38,6 +38,34 @@ module FacebookAds
38
38
  edge.get 'UserAvailableCatalogs'
39
39
  end
40
40
 
41
+ has_edge :branded_content_ad_permissions do |edge|
42
+ edge.get 'IgbcAdsPermission'
43
+ edge.post 'IgbcAdsPermission' do |api|
44
+ api.has_param :creator_instagram_account, 'string'
45
+ api.has_param :revoke, 'bool'
46
+ end
47
+ end
48
+
49
+ has_edge :branded_content_advertisable_medias do |edge|
50
+ edge.get 'BrandedContentShadowIgMediaId' do |api|
51
+ api.has_param :creator_username, 'string'
52
+ api.has_param :only_fetch_allowlisted, 'bool'
53
+ api.has_param :permalinks, { list: 'string' }
54
+ end
55
+ end
56
+
57
+ has_edge :branded_content_tag_approval do |edge|
58
+ edge.delete do |api|
59
+ api.has_param :user_ids, { list: 'int' }
60
+ end
61
+ edge.get 'BrandedContentShadowIgUserId' do |api|
62
+ api.has_param :user_ids, { list: 'int' }
63
+ end
64
+ edge.post 'BrandedContentShadowIgUserId' do |api|
65
+ api.has_param :user_ids, { list: 'int' }
66
+ end
67
+ end
68
+
41
69
  has_edge :catalog_product_search do |edge|
42
70
  edge.get 'ShadowIgUserCatalogProductSearch' do |api|
43
71
  api.has_param :catalog_id, 'string'
@@ -27,7 +27,7 @@ module FacebookAds
27
27
  "last_week_mon_sun",
28
28
  "last_week_sun_sat",
29
29
  "last_year",
30
- "maximum",
30
+ "lifetime",
31
31
  "this_month",
32
32
  "this_quarter",
33
33
  "this_week_mon_today",
@@ -22,11 +22,6 @@ module FacebookAds
22
22
  ]
23
23
 
24
24
  METRIC = [
25
- "carousel_album_engagement",
26
- "carousel_album_impressions",
27
- "carousel_album_reach",
28
- "carousel_album_saved",
29
- "carousel_album_video_views",
30
25
  "clips_replays_count",
31
26
  "comments",
32
27
  "engagement",
@@ -47,5 +47,9 @@ module FacebookAds
47
47
  end
48
48
  end
49
49
 
50
+ has_edge :upcoming_events do |edge|
51
+ edge.get
52
+ end
53
+
50
54
  end
51
55
  end
@@ -332,6 +332,7 @@ module FacebookAds
332
332
  "message_context",
333
333
  "message_deliveries",
334
334
  "message_echoes",
335
+ "message_edits",
335
336
  "message_mention",
336
337
  "message_reactions",
337
338
  "message_reads",
@@ -388,6 +389,7 @@ module FacebookAds
388
389
  field :app_id, 'string'
389
390
  field :artists_we_like, 'string'
390
391
  field :attire, 'string'
392
+ field :available_promo_offer_ids, { list: 'map<string, list<map<string, string>>>' }
391
393
  field :awards, 'string'
392
394
  field :band_interests, 'string'
393
395
  field :band_members, 'string'
@@ -436,7 +438,6 @@ module FacebookAds
436
438
  field :has_lead_access, 'HasLeadAccess'
437
439
  field :has_transitioned_to_new_page_experience, 'bool'
438
440
  field :has_whatsapp_business_number, 'bool'
439
- field :has_whatsapp_enterprise_number_using_cloud_api, 'bool'
440
441
  field :has_whatsapp_number, 'bool'
441
442
  field :hometown, 'string'
442
443
  field :hours, 'hash'
@@ -480,7 +481,6 @@ module FacebookAds
480
481
  field :offer_eligible, 'bool'
481
482
  field :overall_star_rating, 'double'
482
483
  field :owner_business, 'Business'
483
- field :page_about_story, 'PageAboutStory'
484
484
  field :page_token, 'string'
485
485
  field :parent_page, 'Page'
486
486
  field :parking, 'PageParking'
@@ -14,12 +14,18 @@ module FacebookAds
14
14
  # pull request for this class.
15
15
 
16
16
  class ProductCatalog < AdObject
17
+ ADDITIONAL_VERTICAL_OPTION = [
18
+ "LOCAL_DA_CATALOG",
19
+ "LOCAL_PRODUCTS",
20
+ ]
21
+
17
22
  VERTICAL = [
18
23
  "adoptable_pets",
19
24
  "bookable",
20
25
  "commerce",
21
26
  "destinations",
22
27
  "flights",
28
+ "generic",
23
29
  "home_listings",
24
30
  "hotels",
25
31
  "jobs",
@@ -97,12 +103,14 @@ module FacebookAds
97
103
  field :feed_count, 'int'
98
104
  field :id, 'string'
99
105
  field :is_catalog_segment, 'bool'
106
+ field :is_local_catalog, 'bool'
100
107
  field :name, 'string'
101
108
  field :owner_business, 'Business'
102
109
  field :product_count, 'int'
103
110
  field :store_catalog_settings, 'StoreCatalogSettings'
104
111
  field :user_access_expire_time, 'datetime'
105
112
  field :vertical, 'string'
113
+ field :additional_vertical_option, { enum: -> { ADDITIONAL_VERTICAL_OPTION }}
106
114
  field :catalog_segment_filter, 'object'
107
115
  field :catalog_segment_product_set_id, 'string'
108
116
  field :destination_catalog_settings, 'hash'
@@ -452,9 +460,6 @@ module FacebookAds
452
460
  api.has_param :material, 'string'
453
461
  api.has_param :mobile_link, 'string'
454
462
  api.has_param :name, 'string'
455
- api.has_param :offer_price_amount, 'int'
456
- api.has_param :offer_price_end_date, 'datetime'
457
- api.has_param :offer_price_start_date, 'datetime'
458
463
  api.has_param :ordering_index, 'int'
459
464
  api.has_param :origin_country, { enum: -> { ProductItem::ORIGIN_COUNTRY }}
460
465
  api.has_param :pattern, 'string'
@@ -97,6 +97,7 @@ module FacebookAds
97
97
  "LANGUAGE_AND_COUNTRY",
98
98
  "LOCAL",
99
99
  "SMART_PIXEL_LANGUAGE_OR_COUNTRY",
100
+ "VERSION",
100
101
  ]
101
102
 
102
103
 
@@ -70,9 +70,6 @@ module FacebookAds
70
70
  api.has_param :material, 'string'
71
71
  api.has_param :mobile_link, 'string'
72
72
  api.has_param :name, 'string'
73
- api.has_param :offer_price_amount, 'int'
74
- api.has_param :offer_price_end_date, 'datetime'
75
- api.has_param :offer_price_start_date, 'datetime'
76
73
  api.has_param :ordering_index, 'int'
77
74
  api.has_param :pattern, 'string'
78
75
  api.has_param :price, 'int'
@@ -304,10 +304,12 @@ module FacebookAds
304
304
  ]
305
305
 
306
306
  ERROR_TYPE = [
307
+ "ADDRESS_BLOCKLISTED_IN_MARKET",
307
308
  "AR_DELETED_DUE_TO_UPDATE",
308
309
  "AR_POLICY_VIOLATED",
309
310
  "AVAILABLE",
310
311
  "BAD_QUALITY_IMAGE",
312
+ "BIZ_MSG_AI_AGENT_DISABLED_BY_USER",
311
313
  "CANNOT_EDIT_SUBSCRIPTION_PRODUCTS",
312
314
  "CHECKOUT_DISABLED_BY_USER",
313
315
  "COMMERCE_ACCOUNT_NOT_LEGALLY_COMPLIANT",
@@ -320,8 +322,10 @@ module FacebookAds
320
322
  "EMPTY_AVAILABILITY",
321
323
  "EMPTY_CONDITION",
322
324
  "EMPTY_DESCRIPTION",
325
+ "EMPTY_IMAGE_URL",
323
326
  "EMPTY_PRODUCT_URL",
324
327
  "EMPTY_SELLER_DESCRIPTION",
328
+ "EMPTY_TITLE",
325
329
  "EXTERNAL_MERCHANT_ID_MISMATCH",
326
330
  "GENERIC_INVALID_FIELD",
327
331
  "HIDDEN_UNTIL_PRODUCT_LAUNCH",
@@ -334,14 +338,28 @@ module FacebookAds
334
338
  "IMAGE_RESOLUTION_LOW",
335
339
  "INACTIVE_SHOPIFY_PRODUCT",
336
340
  "INVALID_COMMERCE_TAX_CATEGORY",
341
+ "INVALID_CONSOLIDATED_LOCALITY_INFORMATION",
342
+ "INVALID_DEALER_COMMUNICATION_PARAMETERS",
343
+ "INVALID_DMA_CODES",
344
+ "INVALID_FB_PAGE_ID",
337
345
  "INVALID_IMAGES",
338
346
  "INVALID_MONETIZER_RETURN_POLICY",
347
+ "INVALID_OFFER_DISCLAIMER_URL",
348
+ "INVALID_OFFER_END_DATE",
339
349
  "INVALID_PRE_ORDER_PARAMS",
350
+ "INVALID_RANGE_FOR_AREA_SIZE",
351
+ "INVALID_RANGE_FOR_BUILT_UP_AREA_SIZE",
352
+ "INVALID_RANGE_FOR_NUM_OF_BATHS",
353
+ "INVALID_RANGE_FOR_NUM_OF_BEDS",
354
+ "INVALID_RANGE_FOR_NUM_OF_ROOMS",
355
+ "INVALID_RANGE_FOR_PARKING_SPACES",
340
356
  "INVALID_SHELTER_PAGE_ID",
341
357
  "INVALID_SHIPPING_PROFILE_PARAMS",
342
358
  "INVALID_SUBSCRIPTION_DISABLE_PARAMS",
343
359
  "INVALID_SUBSCRIPTION_ENABLE_PARAMS",
344
360
  "INVALID_SUBSCRIPTION_PARAMS",
361
+ "INVALID_VEHICLE_STATE",
362
+ "INVALID_VIRTUAL_TOUR_URL_DOMAIN",
345
363
  "INVENTORY_ZERO_AVAILABILITY_IN_STOCK",
346
364
  "IN_ANOTHER_PRODUCT_LAUNCH",
347
365
  "ITEM_GROUP_NOT_SPECIFIED",
@@ -361,8 +379,10 @@ module FacebookAds
361
379
  "MISSING_SIZE",
362
380
  "MISSING_TAX_CATEGORY",
363
381
  "NEGATIVE_COMMUNITY_FEEDBACK",
382
+ "NEGATIVE_PRICE",
364
383
  "NOT_ENOUGH_IMAGES",
365
384
  "NOT_ENOUGH_UNIQUE_PRODUCTS",
385
+ "OVERLAY_DISCLAIMER_EXCEEDED_MAX_LENGTH",
366
386
  "PART_OF_PRODUCT_LAUNCH",
367
387
  "PRODUCT_EXPIRED",
368
388
  "PRODUCT_ITEM_HIDDEN_FROM_ALL_SHOPS",
@@ -767,9 +787,6 @@ module FacebookAds
767
787
  field :iphone_app_store_id, 'int'
768
788
  field :iphone_url, 'string'
769
789
  field :launch_date, 'string'
770
- field :offer_price_amount, 'int'
771
- field :offer_price_end_date, 'datetime'
772
- field :offer_price_start_date, 'datetime'
773
790
  field :return_policy_days, 'int'
774
791
  field :windows_phone_app_id, 'string'
775
792
  field :windows_phone_app_name, 'string'
@@ -41,6 +41,9 @@ module FacebookAds
41
41
  # Conversion happened automatically, for example, a subscription renewal that's set on auto-pay each month.
42
42
  'system_generated',
43
43
 
44
+ # Conversion happened through a business messaging channel, such as WhatsApp or Instagram Direct.
45
+ 'business_messaging',
46
+
44
47
  # Conversion happened in a way that is not listed.
45
48
  'other'
46
49
  ]
@@ -75,6 +75,9 @@ module FacebookAds
75
75
  # Only used for the Advanced Measurement API in the Advanced Analytics product
76
76
  attr_accessor :advanced_measurement_table
77
77
 
78
+ # Messaging channel for the event
79
+ attr_accessor :messaging_channel
80
+
78
81
  # @param [String] event_name
79
82
  # @param [int] event_time
80
83
  # @param [String] event_source_url
@@ -88,6 +91,7 @@ module FacebookAds
88
91
  # @param [int] data_processing_options_state
89
92
  # @param String action_source
90
93
  # @param [String] advanced_measurement_table
94
+ # @param [String] messaging_channel
91
95
  def initialize(event_name: nil,
92
96
  event_time: nil,
93
97
  event_source_url: nil,
@@ -100,7 +104,9 @@ module FacebookAds
100
104
  data_processing_options_country: nil,
101
105
  data_processing_options_state: nil,
102
106
  action_source: nil,
103
- advanced_measurement_table: nil)
107
+ advanced_measurement_table: nil,
108
+ messaging_channel: nil
109
+ )
104
110
 
105
111
  unless event_name.nil?
106
112
  self.event_name = event_name
@@ -141,6 +147,9 @@ module FacebookAds
141
147
  unless advanced_measurement_table.nil?
142
148
  self.advanced_measurement_table = advanced_measurement_table
143
149
  end
150
+ unless messaging_channel.nil?
151
+ self.messaging_channel = messaging_channel
152
+ end
144
153
  end
145
154
 
146
155
  # build the object using the input hash
@@ -202,6 +211,10 @@ module FacebookAds
202
211
  if attributes.has_key?(:'advanced_measurement_table')
203
212
  self.advanced_measurement_table = attributes[:'advanced_measurement_table']
204
213
  end
214
+
215
+ if attributes.has_key?(:'messaging_channel')
216
+ self.messaging_channel = attributes[:'messaging_channel']
217
+ end
205
218
  end
206
219
 
207
220
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -249,6 +262,7 @@ module FacebookAds
249
262
  data_processing_options_state == o.data_processing_options_state &&
250
263
  action_source == o.action_source &&
251
264
  advanced_measurement_table == o.advanced_measurement_table
265
+ messaging_channel == o.messaging_channel
252
266
  end
253
267
 
254
268
  # @see the `==` method
@@ -262,7 +276,7 @@ module FacebookAds
262
276
  [
263
277
  event_name, event_time, event_source_url, opt_out, event_id, user_data, custom_data, app_data,
264
278
  data_processing_options, data_processing_options_country, data_processing_options_state,
265
- action_source, advanced_measurement_table,
279
+ action_source, advanced_measurement_table, messaging_channel,
266
280
  ].hash
267
281
  end
268
282
 
@@ -307,6 +321,9 @@ module FacebookAds
307
321
  unless advanced_measurement_table.nil?
308
322
  hash['advanced_measurement_table'] = advanced_measurement_table
309
323
  end
324
+ unless messaging_channel.nil?
325
+ hash['messaging_channel'] = messaging_channel
326
+ end
310
327
  hash.to_s
311
328
  end
312
329
 
@@ -356,6 +373,9 @@ module FacebookAds
356
373
  unless advanced_measurement_table.nil?
357
374
  hash['advanced_measurement_table'] = advanced_measurement_table
358
375
  end
376
+ unless messaging_channel.nil?
377
+ hash['messaging_channel'] = messaging_channel
378
+ end
359
379
  hash
360
380
  end
361
381
 
@@ -0,0 +1,27 @@
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
+ MessagingChannel = Set[
22
+
23
+ # Conversion happened on WhatsApp.
24
+ 'whatsapp',
25
+ ]
26
+ end
27
+ end
@@ -236,6 +236,11 @@ module FacebookAds
236
236
  @madids = [madid]
237
237
  end
238
238
 
239
+ # ctwaClid ID of a conversation that was started on WhatsApp
240
+ attr_accessor :ctwa_clid
241
+
242
+ # pageId ID of the page that the ad is associated with
243
+ attr_accessor :page_id
239
244
 
240
245
  #UserData is a set of identifiers Facebook can use for targeted attribution
241
246
  # @param [String] email
@@ -276,13 +281,16 @@ module FacebookAds
276
281
  # @param [Array<String>] anon_ids
277
282
  # @param [String] madid
278
283
  # @param [Array<String>] madids
284
+ # @param [String] ctwa_clid
285
+ # @param [String] page_id
279
286
  def initialize(email: nil, emails: nil, phone: nil, phones: nil, gender: nil, genders: nil,
280
287
  date_of_birth: nil, dates_of_birth: nil, last_name: nil, last_names: nil,
281
288
  first_name: nil, first_names: nil, city: nil, cities: nil, state: nil, states: nil,
282
289
  country_code: nil, country_codes: nil, zip_code: nil, zip_codes: nil,
283
290
  external_id: nil, external_ids: nil, client_ip_address: nil,
284
291
  client_user_agent: nil, fbc: nil, fbp: nil, subscription_id: nil, lead_id: nil,
285
- f5first: nil, f5last: nil, fi: nil, dobd: nil, dobm: nil, doby: nil, anon_id: nil, anon_ids: nil, madid:nil, madids: nil)
292
+ f5first: nil, f5last: nil, fi: nil, dobd: nil, dobm: nil, doby: nil, anon_id: nil, anon_ids: nil, madid:nil, madids: nil,
293
+ ctwa_clid: nil, page_id: nil)
286
294
  validate_constructor_values(emails, email, 'emails', 'email')
287
295
  validate_constructor_values(phones, phone, 'phones', 'phone')
288
296
  validate_constructor_values(genders, gender, 'genders', 'gender')
@@ -409,6 +417,12 @@ module FacebookAds
409
417
  unless madids.nil?
410
418
  self.madids = madids
411
419
  end
420
+ unless ctwa_clid.nil?
421
+ self.ctwa_clid = ctwa_clid
422
+ end
423
+ unless page_id.nil?
424
+ self.page_id = page_id
425
+ end
412
426
  end
413
427
 
414
428
  # build the object using the input hash
@@ -540,6 +554,14 @@ module FacebookAds
540
554
  elsif attributes.has_key?(:'madid')
541
555
  self.madids = [attributes[:'madid']]
542
556
  end
557
+
558
+ if attributes.has_key?(:'ctwa_clid')
559
+ self.ctwa_clid = [attributes[:'ctwa_clid']]
560
+ end
561
+
562
+ if attributes.has_key?(:'page_id')
563
+ self.page_id = [attributes[:'page_id']]
564
+ end
543
565
  end
544
566
 
545
567
  # Checks equality by comparing each attribute.
@@ -570,7 +592,9 @@ module FacebookAds
570
592
  dobm == o.dobm &&
571
593
  doby == o.doby &&
572
594
  anon_ids == o.anon_ids &&
573
- madids == o.madids
595
+ madids == o.madids &&
596
+ ctwa_clid == ctwa_clid &&
597
+ page_id == page_id
574
598
  end
575
599
 
576
600
  # @see the `==` method
@@ -606,7 +630,9 @@ module FacebookAds
606
630
  dobm,
607
631
  doby,
608
632
  anon_ids,
609
- madids
633
+ madids,
634
+ ctwa_clid,
635
+ page_id
610
636
  ].hash
611
637
 
612
638
  end
@@ -690,6 +716,12 @@ module FacebookAds
690
716
  unless madids.nil?
691
717
  hash['madids'] = madids
692
718
  end
719
+ unless ctwa_clid.nil?
720
+ hash['ctwa_clid'] = ctwa_clid
721
+ end
722
+ unless page_id.nil?
723
+ hash['page_id'] = page_id
724
+ end
693
725
  hash.to_s
694
726
  end
695
727
 
@@ -772,6 +804,12 @@ module FacebookAds
772
804
  unless madid.nil?
773
805
  hash['madid'] = madids
774
806
  end
807
+ unless ctwa_clid.nil?
808
+ hash['ctwa_clid'] = ctwa_clid
809
+ end
810
+ unless page_id.nil?
811
+ hash['page_id'] = page_id
812
+ end
775
813
  hash.select{|k, v| !v.nil?}
776
814
  end
777
815
 
@@ -15,6 +15,7 @@ module FacebookAds
15
15
 
16
16
  class Shop < AdObject
17
17
 
18
+ field :commerce_merchant_settings, 'CommerceMerchantSettings'
18
19
  field :fb_sales_channel, 'object'
19
20
  field :id, 'string'
20
21
  field :ig_sales_channel, 'object'
@@ -28,6 +28,7 @@ module FacebookAds
28
28
  field :adgroup_id, 'string'
29
29
  field :age_max, 'int'
30
30
  field :age_min, 'int'
31
+ field :age_range, { list: 'int' }
31
32
  field :alternate_auto_targeting_option, 'string'
32
33
  field :app_install_state, 'string'
33
34
  field :audience_network_positions, { list: 'string' }
@@ -105,6 +106,7 @@ module FacebookAds
105
106
  field :regions, { list: 'IdName' }
106
107
  field :relationship_statuses, { list: 'int' }
107
108
  field :site_category, { list: 'string' }
109
+ field :targeting_automation, 'TargetingAutomation'
108
110
  field :targeting_optimization, 'string'
109
111
  field :targeting_relaxation_types, 'TargetingRelaxation'
110
112
  field :user_adclusters, { list: 'IdName' }
@@ -0,0 +1,27 @@
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 TargetingAutomation < AdObject
17
+
18
+ field :advantage_audience, 'int'
19
+ field :shared_audiences, 'int'
20
+ field :value_expression, 'int'
21
+ has_no_id
22
+ has_no_get
23
+ has_no_post
24
+ has_no_delete
25
+
26
+ end
27
+ end
@@ -48,6 +48,7 @@ module FacebookAds
48
48
  field :health_status, 'WhatsAppBusinessHealthStatusForMessageSend'
49
49
  field :id, 'string'
50
50
  field :is_enabled_for_insights, 'bool'
51
+ field :linked_commerce_account, 'CommerceMerchantSettings'
51
52
  field :message_template_namespace, 'string'
52
53
  field :name, 'string'
53
54
  field :on_behalf_of_business_info, 'object'
@@ -140,6 +141,8 @@ module FacebookAds
140
141
  api.has_param :components, { list: 'hash' }
141
142
  api.has_param :cta_url_link_tracking_opted_out, 'bool'
142
143
  api.has_param :language, 'string'
144
+ api.has_param :library_template_button_inputs, { list: 'hash' }
145
+ api.has_param :library_template_name, 'string'
143
146
  api.has_param :message_send_ttl_seconds, 'int'
144
147
  api.has_param :name, 'string'
145
148
  api.has_param :sub_category, { enum: -> { WhatsAppBusinessAccount::SUB_CATEGORY }}