Skip to content

Commit

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

Reviewed By: stcheng

Differential Revision: D54566006

fbshipit-source-id: 55087e609cf0604137c0bd9544ea9f7359ae6f0d
  • Loading branch information
generatedunixname89002005295453 authored and facebook-github-bot committed Mar 6, 2024
1 parent 98cc9bb commit e43a205
Show file tree
Hide file tree
Showing 55 changed files with 1,150 additions and 137 deletions.
Expand Up @@ -31,7 +31,6 @@
fields = [
]
params = {
'hotel_catalog_settings': {'pull_config_id':'<pullConfigID>'},
}
print ProductCatalog(id).update(
fields=fields,
Expand Down
2 changes: 1 addition & 1 deletion facebook_business/__init__.py
Expand Up @@ -7,7 +7,7 @@
from facebook_business.session import FacebookSession
from facebook_business.api import FacebookAdsApi

__version__ = '19.0.0'
__version__ = '19.0.1'
__all__ = [
'session',
'objects',
Expand Down
4 changes: 2 additions & 2 deletions facebook_business/adobjects/ad.py
Expand Up @@ -120,7 +120,7 @@ class DatePreset:
last_week_mon_sun = 'last_week_mon_sun'
last_week_sun_sat = 'last_week_sun_sat'
last_year = 'last_year'
maximum = 'maximum'
lifetime = 'lifetime'
this_month = 'this_month'
this_quarter = 'this_quarter'
this_week_mon_today = 'this_week_mon_today'
Expand Down Expand Up @@ -208,7 +208,7 @@ def api_get(self, fields=None, params=None, batch=None, success=None, failure=No
'last_week_mon_sun',
'last_week_sun_sat',
'last_year',
'maximum',
'lifetime',
'this_month',
'this_quarter',
'this_week_mon_today',
Expand Down
62 changes: 62 additions & 0 deletions facebook_business/adobjects/adaccount.py
Expand Up @@ -2449,6 +2449,38 @@ def get_connected_instagram_accounts(self, fields=None, params=None, batch=None,
self.assure_call()
return request.execute()

def get_connected_instagram_accounts_with_iabp(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False):
from facebook_business.utils import api_utils
if batch is None and (success is not None or failure is not None):
api_utils.warning('`success` and `failure` callback only work for batch call.')
from facebook_business.adobjects.instagramuser import InstagramUser
param_types = {
'business_id': 'string',
}
enums = {
}
request = FacebookRequest(
node_id=self['id'],
method='GET',
endpoint='/connected_instagram_accounts_with_iabp',
api=self._api,
param_checker=TypeChecker(param_types, enums),
target_class=InstagramUser,
api_type='EDGE',
response_parser=ObjectParser(target_class=InstagramUser, api=self._api),
)
request.add_params(params)
request.add_fields(fields)

if batch is not None:
request.add_to_batch(batch, success=success, failure=failure)
return request
elif pending:
return request
else:
self.assure_call()
return request.execute()

def get_conversion_goals(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False):
from facebook_business.utils import api_utils
if batch is None and (success is not None or failure is not None):
Expand Down Expand Up @@ -4073,6 +4105,36 @@ def delete_users_of_any_audience(self, fields=None, params=None, batch=None, suc
self.assure_call()
return request.execute()

def get_value_adjustment_rule_persona_groups(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False):
from facebook_business.utils import api_utils
if batch is None and (success is not None or failure is not None):
api_utils.warning('`success` and `failure` callback only work for batch call.')
param_types = {
}
enums = {
}
request = FacebookRequest(
node_id=self['id'],
method='GET',
endpoint='/value_adjustment_rule_persona_groups',
api=self._api,
param_checker=TypeChecker(param_types, enums),
target_class=AbstractCrudObject,
api_type='EDGE',
response_parser=ObjectParser(target_class=AbstractCrudObject, api=self._api),
)
request.add_params(params)
request.add_fields(fields)

if batch is not None:
request.add_to_batch(batch, success=success, failure=failure)
return request
elif pending:
return request
else:
self.assure_call()
return request.execute()

def get_value_adjustment_rules(self, fields=None, params=None, batch=None, success=None, failure=None, pending=False):
from facebook_business.utils import api_utils
if batch is None and (success is not None or failure is not None):
Expand Down
1 change: 1 addition & 0 deletions facebook_business/adobjects/adaccountadruleshistory.py
Expand Up @@ -42,6 +42,7 @@ class Action:
enable_advantage_plus_creative = 'ENABLE_ADVANTAGE_PLUS_CREATIVE'
enable_advantage_plus_placements = 'ENABLE_ADVANTAGE_PLUS_PLACEMENTS'
enable_autoflow = 'ENABLE_AUTOFLOW'
enable_gen_uncrop = 'ENABLE_GEN_UNCROP'
enable_semantic_based_audience_expansion = 'ENABLE_SEMANTIC_BASED_AUDIENCE_EXPANSION'
endpoint_pinged = 'ENDPOINT_PINGED'
error = 'ERROR'
Expand Down
6 changes: 6 additions & 0 deletions facebook_business/adobjects/adaccountadvolume.py
Expand Up @@ -75,9 +75,11 @@ class RecommendationType:
autoflow_opt_in_fallback_duplication_flow = 'AUTOFLOW_OPT_IN_FALLBACK_DUPLICATION_FLOW'
automatic_placements = 'AUTOMATIC_PLACEMENTS'
auto_bid = 'AUTO_BID'
blended_ads = 'BLENDED_ADS'
broad_targeting = 'BROAD_TARGETING'
capi = 'CAPI'
capi_performance_match_key = 'CAPI_PERFORMANCE_MATCH_KEY'
capi_performance_match_key_v2 = 'CAPI_PERFORMANCE_MATCH_KEY_V2'
cash_rewards_opt_in = 'CASH_REWARDS_OPT_IN'
connect_facebook_page_to_instagram = 'CONNECT_FACEBOOK_PAGE_TO_INSTAGRAM'
connect_facebook_page_to_whatsapp = 'CONNECT_FACEBOOK_PAGE_TO_WHATSAPP'
Expand All @@ -95,10 +97,13 @@ class RecommendationType:
creative_limited_hourly = 'CREATIVE_LIMITED_HOURLY'
creator_ads_pa_conversion = 'CREATOR_ADS_PA_CONVERSION'
cta = 'CTA'
ctx_budget_optimization = 'CTX_BUDGET_OPTIMIZATION'
da_advantage_plus_creative_info_labels = 'DA_ADVANTAGE_PLUS_CREATIVE_INFO_LABELS'
dead_link = 'DEAD_LINK'
dynamic_advantage_campaign_budget = 'DYNAMIC_ADVANTAGE_CAMPAIGN_BUDGET'
ecosystem_bid_reduce_l1_cardinality = 'ECOSYSTEM_BID_REDUCE_L1_CARDINALITY'
evc_app_duplication_upgrade = 'EVC_APP_DUPLICATION_UPGRADE'
evc_web_duplication_upgrade = 'EVC_WEB_DUPLICATION_UPGRADE'
fragmentation = 'FRAGMENTATION'
ges_test = 'GES_TEST'
guidance_center_code_gen = 'GUIDANCE_CENTER_CODE_GEN'
Expand Down Expand Up @@ -133,6 +138,7 @@ class RecommendationType:
shops_ads = 'SHOPS_ADS'
signals_growth_capi = 'SIGNALS_GROWTH_CAPI'
signals_growth_capi_table = 'SIGNALS_GROWTH_CAPI_TABLE'
signals_growth_capi_v2 = 'SIGNALS_GROWTH_CAPI_V2'
six_plus_manual_placements = 'SIX_PLUS_MANUAL_PLACEMENTS'
spend_limit = 'SPEND_LIMIT'
syd_test_mode = 'SYD_TEST_MODE'
Expand Down
1 change: 1 addition & 0 deletions facebook_business/adobjects/adaccountdeliveryestimate.py
Expand Up @@ -44,6 +44,7 @@ class OptimizationGoal:
landing_page_views = 'LANDING_PAGE_VIEWS'
lead_generation = 'LEAD_GENERATION'
link_clicks = 'LINK_CLICKS'
meaningful_call_attempt = 'MEANINGFUL_CALL_ATTEMPT'
messaging_appointment_conversion = 'MESSAGING_APPOINTMENT_CONVERSION'
messaging_purchase_conversion = 'MESSAGING_PURCHASE_CONVERSION'
none = 'NONE'
Expand Down
44 changes: 44 additions & 0 deletions facebook_business/adobjects/adassetbody.py
@@ -0,0 +1,44 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.

# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.

from facebook_business.adobjects.abstractobject import AbstractObject
from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject
from facebook_business.adobjects.objectparser import ObjectParser
from facebook_business.api import FacebookRequest
from facebook_business.typechecker import TypeChecker

"""
This class is auto-generated.
For any issues or feature requests related to this class, please let us know on
github and we'll fix in our codegen framework. We'll not be able to accept
pull request for this class.
"""

class AdAssetBody(
AbstractCrudObject,
):

def __init__(self, fbid=None, parent_id=None, api=None):
self._isAdAssetBody = True
super(AdAssetBody, self).__init__(fbid, parent_id, api)

class Field(AbstractObject.Field):
id = 'id'
text = 'text'
url_tags = 'url_tags'

_field_types = {
'id': 'string',
'text': 'string',
'url_tags': 'string',
}
@classmethod
def _get_field_enum_info(cls):
field_enum_info = {}
return field_enum_info


42 changes: 42 additions & 0 deletions facebook_business/adobjects/adassetcalltoactiontype.py
@@ -0,0 +1,42 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.

# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.

from facebook_business.adobjects.abstractobject import AbstractObject
from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject
from facebook_business.adobjects.objectparser import ObjectParser
from facebook_business.api import FacebookRequest
from facebook_business.typechecker import TypeChecker

"""
This class is auto-generated.
For any issues or feature requests related to this class, please let us know on
github and we'll fix in our codegen framework. We'll not be able to accept
pull request for this class.
"""

class AdAssetCallToActionType(
AbstractCrudObject,
):

def __init__(self, fbid=None, parent_id=None, api=None):
self._isAdAssetCallToActionType = True
super(AdAssetCallToActionType, self).__init__(fbid, parent_id, api)

class Field(AbstractObject.Field):
id = 'id'
name = 'name'

_field_types = {
'id': 'string',
'name': 'string',
}
@classmethod
def _get_field_enum_info(cls):
field_enum_info = {}
return field_enum_info


44 changes: 44 additions & 0 deletions facebook_business/adobjects/adassetdescription.py
@@ -0,0 +1,44 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.

# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.

from facebook_business.adobjects.abstractobject import AbstractObject
from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject
from facebook_business.adobjects.objectparser import ObjectParser
from facebook_business.api import FacebookRequest
from facebook_business.typechecker import TypeChecker

"""
This class is auto-generated.
For any issues or feature requests related to this class, please let us know on
github and we'll fix in our codegen framework. We'll not be able to accept
pull request for this class.
"""

class AdAssetDescription(
AbstractCrudObject,
):

def __init__(self, fbid=None, parent_id=None, api=None):
self._isAdAssetDescription = True
super(AdAssetDescription, self).__init__(fbid, parent_id, api)

class Field(AbstractObject.Field):
id = 'id'
text = 'text'
url_tags = 'url_tags'

_field_types = {
'id': 'string',
'text': 'string',
'url_tags': 'string',
}
@classmethod
def _get_field_enum_info(cls):
field_enum_info = {}
return field_enum_info


1 change: 1 addition & 0 deletions facebook_business/adobjects/adassetfeedspec.py
Expand Up @@ -81,6 +81,7 @@ class CallToActionTypes:
inquire_now = 'INQUIRE_NOW'
install_app = 'INSTALL_APP'
install_mobile_app = 'INSTALL_MOBILE_APP'
join_channel = 'JOIN_CHANNEL'
learn_more = 'LEARN_MORE'
like_page = 'LIKE_PAGE'
listen_music = 'LISTEN_MUSIC'
Expand Down
52 changes: 52 additions & 0 deletions facebook_business/adobjects/adassetimage.py
@@ -0,0 +1,52 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.

# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.

from facebook_business.adobjects.abstractobject import AbstractObject
from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject
from facebook_business.adobjects.objectparser import ObjectParser
from facebook_business.api import FacebookRequest
from facebook_business.typechecker import TypeChecker

"""
This class is auto-generated.
For any issues or feature requests related to this class, please let us know on
github and we'll fix in our codegen framework. We'll not be able to accept
pull request for this class.
"""

class AdAssetImage(
AbstractCrudObject,
):

def __init__(self, fbid=None, parent_id=None, api=None):
self._isAdAssetImage = True
super(AdAssetImage, self).__init__(fbid, parent_id, api)

class Field(AbstractObject.Field):
hash = 'hash'
id = 'id'
image_crops = 'image_crops'
name = 'name'
tag = 'tag'
url = 'url'
url_tags = 'url_tags'

_field_types = {
'hash': 'string',
'id': 'string',
'image_crops': 'AdsImageCrops',
'name': 'string',
'tag': 'string',
'url': 'string',
'url_tags': 'string',
}
@classmethod
def _get_field_enum_info(cls):
field_enum_info = {}
return field_enum_info


0 comments on commit e43a205

Please sign in to comment.