Skip to content

Commit 65b2057

Browse files
satwikareddy3facebook-github-bot
authored andcommitted
Auto-generated python SDK code update
Summary: ignore-conflict-markers Reviewed By: liliarizona Differential Revision: D72083607 fbshipit-source-id: 8b3ec0cd9f65298276de997afbca9a8a0861714d
1 parent e7e14c5 commit 65b2057

File tree

65 files changed

+930
-456
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+930
-456
lines changed

facebook_business/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
from facebook_business.session import FacebookSession
88
from facebook_business.api import FacebookAdsApi
99

10-
__version__ = '22.0.2'
10+
__version__ = '22.0.3'
1111
__all__ = ['session', 'api']

facebook_business/adobjects/adaccount.py

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ class Field(AbstractObject.Field):
7171
id = 'id'
7272
io_number = 'io_number'
7373
is_attribution_spec_system_default = 'is_attribution_spec_system_default'
74+
is_ba_skip_delayed_eligible = 'is_ba_skip_delayed_eligible'
7475
is_direct_deals_enabled = 'is_direct_deals_enabled'
7576
is_in_3ds_authorization_enabled_market = 'is_in_3ds_authorization_enabled_market'
7677
is_notifications_enabled = 'is_notifications_enabled'
@@ -288,6 +289,7 @@ def api_update(self, fields=None, params=None, batch=None, success=None, failure
288289
'default_dsa_payor': 'string',
289290
'end_advertiser': 'string',
290291
'existing_customers': 'list<string>',
292+
'is_ba_skip_delayed_eligible': 'bool',
291293
'is_notifications_enabled': 'bool',
292294
'media_agency': 'string',
293295
'name': 'string',
@@ -1417,6 +1419,7 @@ def create_ad_set(self, fields=None, params=None, batch=None, success=None, fail
14171419
'existing_customer_budget_percentage': 'unsigned int',
14181420
'frequency_control_specs': 'list<Object>',
14191421
'full_funnel_exploration_mode': 'full_funnel_exploration_mode_enum',
1422+
'is_ba_skip_delayed_eligible': 'bool',
14201423
'is_dynamic_creative': 'bool',
14211424
'is_sac_cfca_terms_certified': 'bool',
14221425
'lifetime_budget': 'unsigned int',
@@ -3380,6 +3383,37 @@ def get_max_bid(self, fields=None, params=None, batch=None, success=None, failur
33803383
self.assure_call()
33813384
return request.execute()
33823385

3386+
def get_mcme_conversions(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False):
3387+
from facebook_business.utils import api_utils
3388+
if batch is None and (success is not None or failure is not None):
3389+
api_utils.warning('`success` and `failure` callback only work for batch call.')
3390+
from facebook_business.adobjects.adsmcmeconversion import AdsMcmeConversion
3391+
param_types = {
3392+
}
3393+
enums = {
3394+
}
3395+
request = FacebookRequest(
3396+
node_id=self['id'],
3397+
method='GET',
3398+
endpoint='/mcmeconversions',
3399+
api=self._api,
3400+
param_checker=TypeChecker(param_types, enums),
3401+
target_class=AdsMcmeConversion,
3402+
api_type='EDGE',
3403+
response_parser=ObjectParser(target_class=AdsMcmeConversion, api=self._api),
3404+
)
3405+
request.add_params(params)
3406+
request.add_fields(fields)
3407+
3408+
if batch is not None:
3409+
request.add_to_batch(batch, success=success, failure=failure)
3410+
return request
3411+
elif pending:
3412+
return request
3413+
else:
3414+
self.assure_call()
3415+
return request.execute()
3416+
33833417
def get_minimum_budgets(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False):
33843418
from facebook_business.utils import api_utils
33853419
if batch is None and (success is not None or failure is not None):
@@ -4344,8 +4378,10 @@ def get_value_rule_set(self, fields=None, params=None, batch=None, success=None,
43444378
api_utils.warning('`success` and `failure` callback only work for batch call.')
43454379
from facebook_business.adobjects.adsvalueadjustmentrulecollection import AdsValueAdjustmentRuleCollection
43464380
param_types = {
4381+
'product_type': 'product_type_enum',
43474382
}
43484383
enums = {
4384+
'product_type_enum': AdsValueAdjustmentRuleCollection.ProductType.__dict__.values(),
43494385
}
43504386
request = FacebookRequest(
43514387
node_id=self['id'],
@@ -4369,6 +4405,41 @@ def get_value_rule_set(self, fields=None, params=None, batch=None, success=None,
43694405
self.assure_call()
43704406
return request.execute()
43714407

4408+
def create_value_rule_set(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False):
4409+
from facebook_business.utils import api_utils
4410+
if batch is None and (success is not None or failure is not None):
4411+
api_utils.warning('`success` and `failure` callback only work for batch call.')
4412+
from facebook_business.adobjects.adsvalueadjustmentrulecollection import AdsValueAdjustmentRuleCollection
4413+
param_types = {
4414+
'name': 'string',
4415+
'product_type': 'product_type_enum',
4416+
'rules': 'list<map>',
4417+
}
4418+
enums = {
4419+
'product_type_enum': AdsValueAdjustmentRuleCollection.ProductType.__dict__.values(),
4420+
}
4421+
request = FacebookRequest(
4422+
node_id=self['id'],
4423+
method='POST',
4424+
endpoint='/value_rule_set',
4425+
api=self._api,
4426+
param_checker=TypeChecker(param_types, enums),
4427+
target_class=AdsValueAdjustmentRuleCollection,
4428+
api_type='EDGE',
4429+
response_parser=ObjectParser(target_class=AdsValueAdjustmentRuleCollection, api=self._api),
4430+
)
4431+
request.add_params(params)
4432+
request.add_fields(fields)
4433+
4434+
if batch is not None:
4435+
request.add_to_batch(batch, success=success, failure=failure)
4436+
return request
4437+
elif pending:
4438+
return request
4439+
else:
4440+
self.assure_call()
4441+
return request.execute()
4442+
43724443
def get_video_ads(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False):
43734444
from facebook_business.utils import api_utils
43744445
if batch is None and (success is not None or failure is not None):
@@ -4482,6 +4553,7 @@ def create_video_ad(self, fields=None, params=None, batch=None, success=None, fa
44824553
'id': 'string',
44834554
'io_number': 'string',
44844555
'is_attribution_spec_system_default': 'bool',
4556+
'is_ba_skip_delayed_eligible': 'bool',
44854557
'is_direct_deals_enabled': 'bool',
44864558
'is_in_3ds_authorization_enabled_market': 'bool',
44874559
'is_notifications_enabled': 'bool',

facebook_business/adobjects/adaccountadruleshistory.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class Action:
3939
changed_bid = 'CHANGED_BID'
4040
changed_budget = 'CHANGED_BUDGET'
4141
consolidate_asc_fragmentation = 'CONSOLIDATE_ASC_FRAGMENTATION'
42+
consolidate_fragmentation = 'CONSOLIDATE_FRAGMENTATION'
4243
convert_asc_cp_single_instance = 'CONVERT_ASC_CP_SINGLE_INSTANCE'
4344
email = 'EMAIL'
4445
enable_advantage_campaign_budget = 'ENABLE_ADVANTAGE_CAMPAIGN_BUDGET'

facebook_business/adobjects/adaccountadvolume.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class RecommendationType:
4545
account_spend_limit = 'ACCOUNT_SPEND_LIMIT'
4646
account_spend_limit_duplication = 'ACCOUNT_SPEND_LIMIT_DUPLICATION'
4747
aco_toggle = 'ACO_TOGGLE'
48+
adopt_capi_gateway_from_test_drive = 'ADOPT_CAPI_GATEWAY_FROM_TEST_DRIVE'
4849
ads_reporting = 'ADS_REPORTING'
4950
ads_status = 'ADS_STATUS'
5051
advanced_campaign_budget = 'ADVANCED_CAMPAIGN_BUDGET'
@@ -67,11 +68,13 @@ class RecommendationType:
6768
advantage_plus_creative = 'ADVANTAGE_PLUS_CREATIVE'
6869
advantage_plus_creative_catalog = 'ADVANTAGE_PLUS_CREATIVE_CATALOG'
6970
advantage_plus_creative_se = 'ADVANTAGE_PLUS_CREATIVE_SE'
71+
advantage_plus_lead_campaign = 'ADVANTAGE_PLUS_LEAD_CAMPAIGN'
7072
advantage_plus_placements_duplication = 'ADVANTAGE_PLUS_PLACEMENTS_DUPLICATION'
7173
advantage_plus_placements_friction = 'ADVANTAGE_PLUS_PLACEMENTS_FRICTION'
7274
advantage_plus_placements_v2_duplication = 'ADVANTAGE_PLUS_PLACEMENTS_V2_DUPLICATION'
7375
advantage_shopping_campaign = 'ADVANTAGE_SHOPPING_CAMPAIGN'
7476
advantage_shopping_campaign_fragmentation = 'ADVANTAGE_SHOPPING_CAMPAIGN_FRAGMENTATION'
77+
ad_account_placement_controls_upsell = 'AD_ACCOUNT_PLACEMENT_CONTROLS_UPSELL'
7578
ad_lift_recall_goal = 'AD_LIFT_RECALL_GOAL'
7679
ad_lift_recall_goal_precreate = 'AD_LIFT_RECALL_GOAL_PRECREATE'
7780
ad_lift_recall_optimization_goal = 'AD_LIFT_RECALL_OPTIMIZATION_GOAL'
@@ -80,6 +83,8 @@ class RecommendationType:
8083
aggregated_bid_limited = 'AGGREGATED_BID_LIMITED'
8184
aggregated_budget_limited = 'AGGREGATED_BUDGET_LIMITED'
8285
aggregated_cost_limited = 'AGGREGATED_COST_LIMITED'
86+
aplusc_music = 'APLUSC_MUSIC'
87+
aplusc_text_improvements = 'APLUSC_TEXT_IMPROVEMENTS'
8388
aplus_c_catalog_duplication = 'APLUS_C_CATALOG_DUPLICATION'
8489
app_aem_v2_installation_promotion = 'APP_AEM_V2_INSTALLATION_PROMOTION'
8590
app_engaged_view_conversions_duplication = 'APP_ENGAGED_VIEW_CONVERSIONS_DUPLICATION'
@@ -103,14 +108,21 @@ class RecommendationType:
103108
automatic_placements = 'AUTOMATIC_PLACEMENTS'
104109
automatic_placements_v2 = 'AUTOMATIC_PLACEMENTS_V2'
105110
auto_bid = 'AUTO_BID'
111+
auto_cat_selection_enhancement = 'AUTO_CAT_SELECTION_ENHANCEMENT'
106112
background_generation = 'BACKGROUND_GENERATION'
107113
blended_ads = 'BLENDED_ADS'
108114
blended_ads_duplication = 'BLENDED_ADS_DUPLICATION'
109115
blended_ads_for_shops_ads_duplication = 'BLENDED_ADS_FOR_SHOPS_ADS_DUPLICATION'
116+
bpbaa_with_capi_upsell = 'BPBAA_WITH_CAPI_UPSELL'
117+
broadgeo_am_upsell_guidance = 'BROADGEO_AM_UPSELL_GUIDANCE'
110118
broad_targeting = 'BROAD_TARGETING'
111119
budget_limited = 'BUDGET_LIMITED'
120+
budget_reallocation = 'BUDGET_REALLOCATION'
112121
capi = 'CAPI'
122+
capi_crm_funnel = 'CAPI_CRM_FUNNEL'
113123
capi_crm_guidance = 'CAPI_CRM_GUIDANCE'
124+
capi_crm_setup = 'CAPI_CRM_SETUP'
125+
capi_event_coverage = 'CAPI_EVENT_COVERAGE'
114126
capi_penetration = 'CAPI_PENETRATION'
115127
capi_performance_match_key = 'CAPI_PERFORMANCE_MATCH_KEY'
116128
capi_performance_match_key_v2 = 'CAPI_PERFORMANCE_MATCH_KEY_V2'
@@ -122,6 +134,7 @@ class RecommendationType:
122134
connect_facebook_page_to_instagram = 'CONNECT_FACEBOOK_PAGE_TO_INSTAGRAM'
123135
connect_facebook_page_to_whatsapp = 'CONNECT_FACEBOOK_PAGE_TO_WHATSAPP'
124136
conversion_leads_optimization = 'CONVERSION_LEADS_OPTIMIZATION'
137+
conversion_leads_optimization_duplication = 'CONVERSION_LEADS_OPTIMIZATION_DUPLICATION'
125138
conversion_lead_ads = 'CONVERSION_LEAD_ADS'
126139
cost_goal = 'COST_GOAL'
127140
cost_goal_budget_limited = 'COST_GOAL_BUDGET_LIMITED'
@@ -146,6 +159,8 @@ class RecommendationType:
146159
ctx_cta_upgrade_in_duplication = 'CTX_CTA_UPGRADE_IN_DUPLICATION'
147160
ctx_ctmpo_upgrade = 'CTX_CTMPO_UPGRADE'
148161
ctx_guidance = 'CTX_GUIDANCE'
162+
ctx_hvs = 'CTX_HVS'
163+
ctx_multi_message_destination = 'CTX_MULTI_MESSAGE_DESTINATION'
149164
ctx_precreate = 'CTX_PRECREATE'
150165
ctx_sabr_cbo = 'CTX_SABR_CBO'
151166
ctx_sabr_non_cbo = 'CTX_SABR_NON_CBO'
@@ -157,6 +172,7 @@ class RecommendationType:
157172
dead_link = 'DEAD_LINK'
158173
defragmentation_acb = 'DEFRAGMENTATION_ACB'
159174
defragmentation_acb_duplication = 'DEFRAGMENTATION_ACB_DUPLICATION'
175+
defragmentation_using_value_rules_test_v2 = 'DEFRAGMENTATION_USING_VALUE_RULES_TEST_V2'
160176
delivery_error = 'DELIVERY_ERROR'
161177
delivery_warning = 'DELIVERY_WARNING'
162178
dynamic_advantage_campaign_budget = 'DYNAMIC_ADVANTAGE_CAMPAIGN_BUDGET'
@@ -222,6 +238,7 @@ class RecommendationType:
222238
predictive_creative_limited = 'PREDICTIVE_CREATIVE_LIMITED'
223239
predictive_creative_limited_hourly = 'PREDICTIVE_CREATIVE_LIMITED_HOURLY'
224240
preparing_status = 'PREPARING_STATUS'
241+
product_set_boosting = 'PRODUCT_SET_BOOSTING'
225242
purchase_optimization = 'PURCHASE_OPTIMIZATION'
226243
rapid_learning_limited = 'RAPID_LEARNING_LIMITED'
227244
rapid_learning_phase = 'RAPID_LEARNING_PHASE'
@@ -261,6 +278,7 @@ class RecommendationType:
261278
syd_test_mode = 'SYD_TEST_MODE'
262279
tailored_lead_ad_campaign = 'TAILORED_LEAD_AD_CAMPAIGN'
263280
tailored_messages_campaign = 'TAILORED_MESSAGES_CAMPAIGN'
281+
targeting_creative_fragmentation = 'TARGETING_CREATIVE_FRAGMENTATION'
264282
tla_creation_package = 'TLA_CREATION_PACKAGE'
265283
top_adsets_with_ads_under_cap = 'TOP_ADSETS_WITH_ADS_UNDER_CAP'
266284
top_campaigns_with_ads_under_cap = 'TOP_CAMPAIGNS_WITH_ADS_UNDER_CAP'
@@ -273,9 +291,11 @@ class RecommendationType:
273291
unified_inbox = 'UNIFIED_INBOX'
274292
unused_budget = 'UNUSED_BUDGET'
275293
value_diagnostics_guidance = 'VALUE_DIAGNOSTICS_GUIDANCE'
294+
value_optimization_goal = 'VALUE_OPTIMIZATION_GOAL'
276295
video_length = 'VIDEO_LENGTH'
277296
video_views_upsell = 'VIDEO_VIEWS_UPSELL'
278297
video_views_upsell_precreate = 'VIDEO_VIEWS_UPSELL_PRECREATE'
298+
vo_vt_1d_defaulting = 'VO_VT_1D_DEFAULTING'
279299
wa_messaging_partners = 'WA_MESSAGING_PARTNERS'
280300
wa_messaging_partners_precreate = 'WA_MESSAGING_PARTNERS_PRECREATE'
281301
web_engaged_view_conversions = 'WEB_ENGAGED_VIEW_CONVERSIONS'
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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+
from facebook_business.adobjects.abstractobject import AbstractObject
8+
9+
"""
10+
This class is auto-generated.
11+
12+
For any issues or feature requests related to this class, please let us know on
13+
github and we'll fix in our codegen framework. We'll not be able to accept
14+
pull request for this class.
15+
"""
16+
17+
class AdAccountAmountSpentHistory(
18+
AbstractObject,
19+
):
20+
21+
def __init__(self, api=None):
22+
super(AdAccountAmountSpentHistory, self).__init__()
23+
self._isAdAccountAmountSpentHistory = True
24+
self._api = api
25+
26+
class Field(AbstractObject.Field):
27+
amount_spent = 'amount_spent'
28+
spend_cap = 'spend_cap'
29+
time_start = 'time_start'
30+
time_stop = 'time_stop'
31+
32+
_field_types = {
33+
'amount_spent': 'int',
34+
'spend_cap': 'int',
35+
'time_start': 'string',
36+
'time_stop': 'string',
37+
}
38+
@classmethod
39+
def _get_field_enum_info(cls):
40+
field_enum_info = {}
41+
return field_enum_info
42+
43+

facebook_business/adobjects/adaccountdeliveryestimate.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class Field(AbstractObject.Field):
3232
targeting_optimization_types = 'targeting_optimization_types'
3333

3434
class OptimizationGoal:
35+
advertiser_siloed_value = 'ADVERTISER_SILOED_VALUE'
3536
ad_recall_lift = 'AD_RECALL_LIFT'
3637
app_installs = 'APP_INSTALLS'
3738
app_installs_and_offsite_conversions = 'APP_INSTALLS_AND_OFFSITE_CONVERSIONS'
@@ -51,6 +52,7 @@ class OptimizationGoal:
5152
offsite_conversions = 'OFFSITE_CONVERSIONS'
5253
page_likes = 'PAGE_LIKES'
5354
post_engagement = 'POST_ENGAGEMENT'
55+
profile_and_page_engagement = 'PROFILE_AND_PAGE_ENGAGEMENT'
5456
profile_visit = 'PROFILE_VISIT'
5557
quality_call = 'QUALITY_CALL'
5658
quality_lead = 'QUALITY_LEAD'

facebook_business/adobjects/adaccountlivevideoadvertiser.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,15 @@ def __init__(self, api=None):
2626
class Field(AbstractObject.Field):
2727
is_lva_toggle_on = 'is_lva_toggle_on'
2828
lva_default_budget = 'lva_default_budget'
29+
should_default_current_live = 'should_default_current_live'
30+
should_default_scheduled_live = 'should_default_scheduled_live'
2931
should_show_lva_toggle = 'should_show_lva_toggle'
3032

3133
_field_types = {
3234
'is_lva_toggle_on': 'bool',
3335
'lva_default_budget': 'int',
36+
'should_default_current_live': 'bool',
37+
'should_default_scheduled_live': 'bool',
3438
'should_show_lva_toggle': 'bool',
3539
}
3640
@classmethod

facebook_business/adobjects/adaccountoptimizationgoalsaemv2eligibility.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class Field(AbstractObject.Field):
2828
optimization_goal = 'optimization_goal'
2929

3030
class OptimizationGoal:
31+
advertiser_siloed_value = 'ADVERTISER_SILOED_VALUE'
3132
ad_recall_lift = 'AD_RECALL_LIFT'
3233
app_installs = 'APP_INSTALLS'
3334
app_installs_and_offsite_conversions = 'APP_INSTALLS_AND_OFFSITE_CONVERSIONS'
@@ -47,6 +48,7 @@ class OptimizationGoal:
4748
offsite_conversions = 'OFFSITE_CONVERSIONS'
4849
page_likes = 'PAGE_LIKES'
4950
post_engagement = 'POST_ENGAGEMENT'
51+
profile_and_page_engagement = 'PROFILE_AND_PAGE_ENGAGEMENT'
5052
profile_visit = 'PROFILE_VISIT'
5153
quality_call = 'QUALITY_CALL'
5254
quality_lead = 'QUALITY_LEAD'
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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+
from facebook_business.adobjects.abstractobject import AbstractObject
8+
9+
"""
10+
This class is auto-generated.
11+
12+
For any issues or feature requests related to this class, please let us know on
13+
github and we'll fix in our codegen framework. We'll not be able to accept
14+
pull request for this class.
15+
"""
16+
17+
class AdAccountSpendCapChangeHistory(
18+
AbstractObject,
19+
):
20+
21+
def __init__(self, api=None):
22+
super(AdAccountSpendCapChangeHistory, self).__init__()
23+
self._isAdAccountSpendCapChangeHistory = True
24+
self._api = api
25+
26+
class Field(AbstractObject.Field):
27+
action = 'action'
28+
spend_cap = 'spend_cap'
29+
time_start = 'time_start'
30+
time_stop = 'time_stop'
31+
32+
_field_types = {
33+
'action': 'string',
34+
'spend_cap': 'int',
35+
'time_start': 'string',
36+
'time_stop': 'string',
37+
}
38+
@classmethod
39+
def _get_field_enum_info(cls):
40+
field_enum_info = {}
41+
return field_enum_info
42+
43+

facebook_business/adobjects/adaccounttargetingunified.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,7 @@ class WhitelistedTypes:
414414
home_type = 'home_type'
415415
home_value = 'home_value'
416416
household_composition = 'household_composition'
417+
household_income = 'household_income'
417418
id = 'id'
418419
income = 'income'
419420
industries = 'industries'
@@ -463,6 +464,7 @@ class WhitelistedTypes:
463464
topic = 'topic'
464465
trending = 'trending'
465466
user_adclusters = 'user_adclusters'
467+
user_age_unknown = 'user_age_unknown'
466468
user_device = 'user_device'
467469
user_event = 'user_event'
468470
user_os = 'user_os'

0 commit comments

Comments
 (0)