Skip to content

Commit

Permalink
Auto-generated ruby SDK code update
Browse files Browse the repository at this point in the history
Summary: ignore-conflict-markers

Reviewed By: stcheng

Differential Revision: D56033562

fbshipit-source-id: ad78bf6964ac6a334d14d578ad2811ec8664c918
  • Loading branch information
generatedunixname89002005295453 authored and facebook-github-bot committed Apr 15, 2024
1 parent f7fb93b commit d22bcc9
Show file tree
Hide file tree
Showing 39 changed files with 134 additions and 81 deletions.
4 changes: 2 additions & 2 deletions examples/AdAccountAdSetsPostAdSetCreateCpa.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
name: 'A CPA Ad Set',
campaign_id: '<adCampaignLinkClicksID>',
daily_budget: '5000',
start_time: '2024-03-20T14:31:58-0700',
end_time: '2024-03-27T14:31:58-0700',
start_time: '2024-04-08T11:26:05-0700',
end_time: '2024-04-15T11:26:05-0700',
billing_event: 'IMPRESSIONS',
optimization_goal: 'REACH',
bid_amount: '1000',
Expand Down
4 changes: 2 additions & 2 deletions examples/AdAccountAdSetsPostAdSetCreateCpaAppEvents.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
name: 'A CPA Ad Set optimized for App Events',
campaign_id: '<adCampaignAppInstallsID>',
daily_budget: '300',
start_time: '2024-03-20T14:32:42-0700',
end_time: '2024-03-27T14:32:42-0700',
start_time: '2024-04-08T11:26:49-0700',
end_time: '2024-04-15T11:26:49-0700',
billing_event: 'IMPRESSIONS',
optimization_goal: 'OFFSITE_CONVERSIONS',
bid_amount: '100',
Expand Down
4 changes: 2 additions & 2 deletions examples/AdAccountAdSetsPostCreateAdSet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
adsets = ad_account.adsets.create({
name: 'My First AdSet',
lifetime_budget: '20000',
start_time: '2024-03-20T14:31:13-0700',
end_time: '2024-03-27T14:31:13-0700',
start_time: '2024-04-08T11:25:19-0700',
end_time: '2024-04-15T11:25:19-0700',
campaign_id: '<adCampaignLinkClicksID>',
bid_amount: '500',
billing_event: 'IMPRESSIONS',
Expand Down
4 changes: 2 additions & 2 deletions examples/AdAccountAdSetsPostDailyBudget20.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
adsets = ad_account.adsets.create({
name: 'My First Adset',
daily_budget: '2000',
start_time: '2024-03-13T14:32:15-0700',
end_time: '2024-03-20T14:32:15-0700',
start_time: '2024-04-01T11:26:23-0700',
end_time: '2024-04-08T11:26:23-0700',
campaign_id: '<adCampaignLinkClicksID>',
bid_amount: '100',
billing_event: 'LINK_CLICKS',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
adsets = ad_account.adsets.create({
name: 'My First Adset',
lifetime_budget: '20000',
start_time: '2024-03-13T14:32:24-0700',
end_time: '2024-03-23T14:32:24-0700',
start_time: '2024-04-01T11:26:32-0700',
end_time: '2024-04-11T11:26:32-0700',
campaign_id: '<adCampaignLinkClicksID>',
bid_amount: '100',
billing_event: 'LINK_CLICKS',
Expand Down
4 changes: 2 additions & 2 deletions examples/AdAccountAdSetsPostOptimizePostEngagement.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
adsets = ad_account.adsets.create({
name: 'My First Adset',
lifetime_budget: '20000',
start_time: '2024-03-13T14:32:33-0700',
end_time: '2024-03-23T14:32:33-0700',
start_time: '2024-04-01T11:26:40-0700',
end_time: '2024-04-11T11:26:40-0700',
campaign_id: '<adCampaignLinkClicksID>',
bid_amount: '500',
billing_event: 'IMPRESSIONS',
Expand Down
2 changes: 1 addition & 1 deletion examples/AdgroupLeadsEdgeAdgroupLeadsFiltered.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
ad = FacebookAds::Ad.get(id)
leadss = ad.leads({
fields: { },
filtering: [{'field':'time_created','operator':'GREATER_THAN','value':1681144509}],
filtering: [{'field':'time_created','operator':'GREATER_THAN','value':1711391704}],
})
2 changes: 1 addition & 1 deletion examples/AdsPixelEventsPost.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@

ads_pixel = FacebookAds::AdsPixel.get(id)
events = ads_pixel.events.create({
data: [{'event_name':'PageView','event_time':1681748568,'user_data':{'fbc':'fb.1.1554763741205.AbCdEfGhIjKlMnOpQrStUvWxYz1234567890','fbp':'fb.1.1558571054389.1098115397','em':'309a0a5c3e211326ae75ca18196d301a9bdbd1a882a4d2569511033da23f0abd'}}],
data: [{'event_name':'PageView','event_time':1711995835,'user_data':{'fbc':'fb.1.1554763741205.AbCdEfGhIjKlMnOpQrStUvWxYz1234567890','fbp':'fb.1.1558571054389.1098115397','em':'309a0a5c3e211326ae75ca18196d301a9bdbd1a882a4d2569511033da23f0abd'}}],
})
17 changes: 17 additions & 0 deletions lib/facebook_ads/ad_objects/ad_account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ class AdAccount < AdObject
"AUTOMOTIVE_MODEL",
"DESTINATION",
"FLIGHT",
"GENERIC",
"HOME_LISTING",
"HOTEL",
"JOB",
Expand All @@ -122,6 +123,7 @@ class AdAccount < AdObject
"CLAIM",
"CUSTOM",
"ENGAGEMENT",
"EXCLUSION",
"FOX",
"LOOKALIKE",
"MANAGED",
Expand Down Expand Up @@ -151,6 +153,7 @@ class AdAccount < AdObject
field :amount_spent, 'string'
field :attribution_spec, { list: 'AttributionSpec' }
field :balance, 'string'
field :brand_safety_content_filter_levels, { list: 'string' }
field :business, 'Business'
field :business_city, 'string'
field :business_country_code, 'string'
Expand Down Expand Up @@ -685,6 +688,10 @@ class AdAccount < AdObject
end
end

has_edge :audience_funnel do |edge|
edge.get
end

has_edge :block_list_drafts do |edge|
edge.post 'AdAccount' do |api|
api.has_param :publisher_urls_file, 'file'
Expand Down Expand Up @@ -762,6 +769,10 @@ class AdAccount < AdObject
edge.get
end

has_edge :cpa_guidance do |edge|
edge.get
end

has_edge :customaudiences do |edge|
edge.get 'CustomAudience' do |api|
api.has_param :business_id, 'string'
Expand Down Expand Up @@ -1113,6 +1124,8 @@ class AdAccount < AdObject
api.has_param :allow_only_fat_head_interests, 'bool'
api.has_param :app_store, { enum: -> { AdAccountTargetingUnified::APP_STORE }}
api.has_param :countries, { list: 'string' }
api.has_param :is_account_level_brand_safety_exclusion, 'bool'
api.has_param :is_account_level_employer_exclusion, 'bool'
api.has_param :is_exclusion, 'bool'
api.has_param :limit_type, { enum: -> { AdAccountTargetingUnified::LIMIT_TYPE }}
api.has_param :objective, { enum: -> { AdAccountTargetingUnified::OBJECTIVE }}
Expand Down Expand Up @@ -1179,6 +1192,10 @@ class AdAccount < AdObject
end
end

has_edge :value_adjustment_rule_collections do |edge|
edge.get
end

has_edge :value_adjustment_rules do |edge|
edge.get
end
Expand Down
5 changes: 5 additions & 0 deletions lib/facebook_ads/ad_objects/ad_account_ad_volume.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class AdAccountAdVolume < AdObject
"ASC_BUDGET_OPTIMIZATION",
"ASC_BUDGET_OPTIMIZATION_PFR",
"ASC_CREATION_PACKAGE",
"ASC_FRAGMENTATION_V2",
"ASPECT_RATIO",
"ATLEAST_6_PLACEMENTS",
"AUCTION_OVERLAP",
Expand All @@ -59,6 +60,7 @@ class AdAccountAdVolume < AdObject
"CAPI_PERFORMANCE_MATCH_KEY",
"CAPI_PERFORMANCE_MATCH_KEY_V2",
"CASH_REWARDS_OPT_IN",
"CONNECTED_SOURCES",
"CONNECT_FACEBOOK_PAGE_TO_INSTAGRAM",
"CONNECT_FACEBOOK_PAGE_TO_WHATSAPP",
"CONVERSION_LEAD_ADS",
Expand All @@ -78,8 +80,10 @@ class AdAccountAdVolume < AdObject
"CREATOR_ADS_PA_CONVERSION",
"CTA",
"CTX_BUDGET_OPTIMIZATION",
"CTX_CREATION_PACKAGE",
"CTX_GUIDANCE",
"DA_ADVANTAGE_PLUS_CREATIVE_INFO_LABELS",
"DA_DUPLICATION_PRODUCT_TAGS",
"DEAD_LINK",
"DYNAMIC_ADVANTAGE_CAMPAIGN_BUDGET",
"ECOSYSTEM_BID_REDUCE_L1_CARDINALITY",
Expand Down Expand Up @@ -110,6 +114,7 @@ class AdAccountAdVolume < AdObject
"PFR_L1_INLINE_MMT",
"PREDICTIVE_CREATIVE_LIMITED",
"PREDICTIVE_CREATIVE_LIMITED_HOURLY",
"PREPARING_STATUS",
"RAPID_LEARNING_LIMITED",
"RAPID_LEARNING_PHASE",
"REELS_DUPLICATION_UPSELL",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ class AdAccountTargetingUnified < AdObject
"location_categories",
"location_cluster_ids",
"location_expansion",
"marketing_message_channels",
"marketing_message_targeting",
"marketplace_product_categories",
"messenger_positions",
Expand Down
1 change: 1 addition & 0 deletions lib/facebook_ads/ad_objects/ad_activity.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class AdActivity < AdObject
"update_campaign_name",
"update_campaign_run_status",
"update_campaign_schedule",
"update_campaign_value_adjustment_rule",
"update_delivery_type_cross_level_shift",
]

Expand Down
8 changes: 8 additions & 0 deletions lib/facebook_ads/ad_objects/ad_asset_feed_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,20 @@ class AdAssetFeedSpec < AdObject
CALL_TO_ACTION_TYPES = [
"ADD_TO_CART",
"APPLY_NOW",
"ASK_ABOUT_SERVICES",
"ASK_FOR_MORE_INFO",
"AUDIO_CALL",
"BOOK_A_CONSULTATION",
"BOOK_NOW",
"BOOK_TRAVEL",
"BUY",
"BUY_NOW",
"BUY_TICKETS",
"BUY_VIA_MESSAGE",
"CALL",
"CALL_ME",
"CALL_NOW",
"CHAT_WITH_US",
"CONFIRM",
"CONTACT",
"CONTACT_US",
Expand All @@ -38,6 +43,7 @@ class AdAssetFeedSpec < AdObject
"FOLLOW_NEWS_STORYLINE",
"FOLLOW_PAGE",
"FOLLOW_USER",
"GET_A_QUOTE",
"GET_DIRECTIONS",
"GET_OFFER",
"GET_OFFER_VIEW",
Expand All @@ -53,6 +59,7 @@ class AdAssetFeedSpec < AdObject
"LIKE_PAGE",
"LISTEN_MUSIC",
"LISTEN_NOW",
"MAKE_AN_APPOINTMENT",
"MESSAGE_PAGE",
"MOBILE_DOWNLOAD",
"NO_BUTTON",
Expand Down Expand Up @@ -112,6 +119,7 @@ class AdAssetFeedSpec < AdObject
field :message_extensions, { list: 'AdAssetMessageExtensions' }
field :onsite_destinations, { list: 'AdAssetOnsiteDestinations' }
field :optimization_type, 'string'
field :promotional_metadata, 'object'
field :reasons_to_shop, 'bool'
field :shops_bundle, 'bool'
field :titles, { list: 'AdAssetFeedSpecTitle' }
Expand Down
7 changes: 7 additions & 0 deletions lib/facebook_ads/ad_objects/ad_creative.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,20 @@ class AdCreative < AdObject
CALL_TO_ACTION_TYPE = [
"ADD_TO_CART",
"APPLY_NOW",
"ASK_ABOUT_SERVICES",
"ASK_FOR_MORE_INFO",
"AUDIO_CALL",
"BOOK_A_CONSULTATION",
"BOOK_NOW",
"BOOK_TRAVEL",
"BUY",
"BUY_NOW",
"BUY_TICKETS",
"BUY_VIA_MESSAGE",
"CALL",
"CALL_ME",
"CALL_NOW",
"CHAT_WITH_US",
"CONFIRM",
"CONTACT",
"CONTACT_US",
Expand All @@ -38,6 +43,7 @@ class AdCreative < AdObject
"FOLLOW_NEWS_STORYLINE",
"FOLLOW_PAGE",
"FOLLOW_USER",
"GET_A_QUOTE",
"GET_DIRECTIONS",
"GET_OFFER",
"GET_OFFER_VIEW",
Expand All @@ -53,6 +59,7 @@ class AdCreative < AdObject
"LIKE_PAGE",
"LISTEN_MUSIC",
"LISTEN_NOW",
"MAKE_AN_APPOINTMENT",
"MESSAGE_PAGE",
"MOBILE_DOWNLOAD",
"NO_BUTTON",
Expand Down
4 changes: 4 additions & 0 deletions lib/facebook_ads/ad_objects/ad_creative_features_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ module FacebookAds
class AdCreativeFeaturesSpec < AdObject

field :advantage_plus_creative, 'AdCreativeFeatureDetails'
field :app_highlights, 'AdCreativeFeatureDetails'
field :audio, 'AdCreativeFeatureDetails'
field :carousel_to_video, 'AdCreativeFeatureDetails'
field :catalog_feed_tag, 'AdCreativeFeatureDetails'
field :customize_product_recommendation, 'AdCreativeFeatureDetails'
field :cv_transformation, 'AdCreativeFeatureDetails'
field :description_automation, 'AdCreativeFeatureDetails'
field :dha_optimization, 'AdCreativeFeatureDetails'
Expand All @@ -36,6 +39,7 @@ class AdCreativeFeaturesSpec < AdObject
field :product_metadata_automation, 'AdCreativeFeatureDetails'
field :product_tags, 'AdCreativeFeatureDetails'
field :profile_card, 'AdCreativeFeatureDetails'
field :site_extensions, 'AdCreativeFeatureDetails'
field :standard_enhancements, 'AdCreativeFeatureDetails'
field :standard_enhancements_catalog, 'AdCreativeFeatureDetails'
field :text_generation, 'AdCreativeFeatureDetails'
Expand Down
1 change: 1 addition & 0 deletions lib/facebook_ads/ad_objects/ad_creative_link_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class AdCreativeLinkData < AdObject
"carousel_images_multi_items",
"carousel_images_single_item",
"carousel_slideshows",
"collection_video",
"single_image",
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,20 @@ class AdCreativeLinkDataCallToAction < AdObject
TYPE = [
"ADD_TO_CART",
"APPLY_NOW",
"ASK_ABOUT_SERVICES",
"ASK_FOR_MORE_INFO",
"AUDIO_CALL",
"BOOK_A_CONSULTATION",
"BOOK_NOW",
"BOOK_TRAVEL",
"BUY",
"BUY_NOW",
"BUY_TICKETS",
"BUY_VIA_MESSAGE",
"CALL",
"CALL_ME",
"CALL_NOW",
"CHAT_WITH_US",
"CONFIRM",
"CONTACT",
"CONTACT_US",
Expand All @@ -38,6 +43,7 @@ class AdCreativeLinkDataCallToAction < AdObject
"FOLLOW_NEWS_STORYLINE",
"FOLLOW_PAGE",
"FOLLOW_USER",
"GET_A_QUOTE",
"GET_DIRECTIONS",
"GET_OFFER",
"GET_OFFER_VIEW",
Expand All @@ -53,6 +59,7 @@ class AdCreativeLinkDataCallToAction < AdObject
"LIKE_PAGE",
"LISTEN_MUSIC",
"LISTEN_NOW",
"MAKE_AN_APPOINTMENT",
"MESSAGE_PAGE",
"MOBILE_DOWNLOAD",
"NO_BUTTON",
Expand Down
1 change: 1 addition & 0 deletions lib/facebook_ads/ad_objects/ad_creative_sourcing_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class AdCreativeSourcingSpec < AdObject
field :associated_product_set_id, 'string'
field :promotion_metadata_spec, { list: 'AdCreativePromotionMetadataSpec' }
field :site_links_spec, { list: 'AdCreativeSiteLinksSpec' }
field :source_url, 'string'
has_no_id
has_no_get
has_no_post
Expand Down
3 changes: 3 additions & 0 deletions lib/facebook_ads/ad_objects/ad_preview.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ class AdPreview < AdObject
"INSTANT_ARTICLE_RECIRCULATION_AD",
"INSTANT_ARTICLE_STANDARD",
"INSTREAM_BANNER_DESKTOP",
"INSTREAM_BANNER_FULLSCREEN_MOBILE",
"INSTREAM_BANNER_IMMERSIVE_MOBILE",
"INSTREAM_BANNER_MOBILE",
"INSTREAM_VIDEO_DESKTOP",
"INSTREAM_VIDEO_FULLSCREEN_MOBILE",
"INSTREAM_VIDEO_IMAGE",
"INSTREAM_VIDEO_IMMERSIVE_MOBILE",
"INSTREAM_VIDEO_MOBILE",
Expand All @@ -70,6 +72,7 @@ class AdPreview < AdObject
"MOBILE_NATIVE",
"RIGHT_COLUMN_STANDARD",
"SUGGESTED_VIDEO_DESKTOP",
"SUGGESTED_VIDEO_FULLSCREEN_MOBILE",
"SUGGESTED_VIDEO_IMMERSIVE_MOBILE",
"SUGGESTED_VIDEO_MOBILE",
"WATCH_FEED_HOME",
Expand Down
1 change: 1 addition & 0 deletions lib/facebook_ads/ad_objects/ad_set.rb
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ class AdSet < AdObject
field :promoted_object, 'AdPromotedObject'
field :recommendations, { list: 'AdRecommendation' }
field :recurring_budget_semantics, 'bool'
field :regional_regulation_identities, 'object'
field :review_feedback, 'string'
field :rf_prediction_id, 'string'
field :source_adset, 'AdSet'
Expand Down
4 changes: 0 additions & 4 deletions lib/facebook_ads/ad_objects/ads_pixel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,5 @@ class AdsPixel < AdObject
end
end

has_edge :telemetry do |edge|
edge.post
end

end
end
Loading

0 comments on commit d22bcc9

Please sign in to comment.