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: D54970845

fbshipit-source-id: c8ef2b1d9350912ec00403451598c315aa9f2dd4
  • Loading branch information
generatedunixname89002005295453 authored and facebook-github-bot committed Mar 19, 2024
1 parent 03898e9 commit ff8c1c6
Show file tree
Hide file tree
Showing 32 changed files with 160 additions and 71 deletions.
4 changes: 2 additions & 2 deletions examples/AdAccountAdSetsPostAdSetCreateCpa.py
Expand Up @@ -35,8 +35,8 @@
'name': 'A CPA Ad Set',
'campaign_id': '<adCampaignLinkClicksID>',
'daily_budget': '5000',
'start_time': '2023-04-24T09:25:05-0700',
'end_time': '2023-05-01T09:25:05-0700',
'start_time': '2024-03-20T14:31:58-0700',
'end_time': '2024-03-27T14:31:58-0700',
'billing_event': 'IMPRESSIONS',
'optimization_goal': 'REACH',
'bid_amount': '1000',
Expand Down
4 changes: 2 additions & 2 deletions examples/AdAccountAdSetsPostAdSetCreateCpaAppEvents.py
Expand Up @@ -35,8 +35,8 @@
'name': 'A CPA Ad Set optimized for App Events',
'campaign_id': '<adCampaignAppInstallsID>',
'daily_budget': '300',
'start_time': '2023-04-24T09:25:55-0700',
'end_time': '2023-05-01T09:25:55-0700',
'start_time': '2024-03-20T14:32:42-0700',
'end_time': '2024-03-27T14:32:42-0700',
'billing_event': 'IMPRESSIONS',
'optimization_goal': 'OFFSITE_CONVERSIONS',
'bid_amount': '100',
Expand Down
4 changes: 2 additions & 2 deletions examples/AdAccountAdSetsPostCreateAdSet.py
Expand Up @@ -34,8 +34,8 @@
params = {
'name': 'My First AdSet',
'lifetime_budget': '20000',
'start_time': '2023-04-24T09:24:18-0700',
'end_time': '2023-05-01T09:24:18-0700',
'start_time': '2024-03-20T14:31:13-0700',
'end_time': '2024-03-27T14:31:13-0700',
'campaign_id': '<adCampaignLinkClicksID>',
'bid_amount': '500',
'billing_event': 'IMPRESSIONS',
Expand Down
4 changes: 2 additions & 2 deletions examples/AdAccountAdSetsPostDailyBudget20.py
Expand Up @@ -34,8 +34,8 @@
params = {
'name': 'My First Adset',
'daily_budget': '2000',
'start_time': '2023-04-17T09:25:24-0700',
'end_time': '2023-04-24T09:25:24-0700',
'start_time': '2024-03-13T14:32:15-0700',
'end_time': '2024-03-20T14:32:15-0700',
'campaign_id': '<adCampaignLinkClicksID>',
'bid_amount': '100',
'billing_event': 'LINK_CLICKS',
Expand Down
Expand Up @@ -34,8 +34,8 @@
params = {
'name': 'My First Adset',
'lifetime_budget': '20000',
'start_time': '2023-04-17T09:25:36-0700',
'end_time': '2023-04-27T09:25:36-0700',
'start_time': '2024-03-13T14:32:24-0700',
'end_time': '2024-03-23T14:32:24-0700',
'campaign_id': '<adCampaignLinkClicksID>',
'bid_amount': '100',
'billing_event': 'LINK_CLICKS',
Expand Down
4 changes: 2 additions & 2 deletions examples/AdAccountAdSetsPostOptimizePostEngagement.py
Expand Up @@ -34,8 +34,8 @@
params = {
'name': 'My First Adset',
'lifetime_budget': '20000',
'start_time': '2023-04-17T09:25:45-0700',
'end_time': '2023-04-27T09:25:45-0700',
'start_time': '2024-03-13T14:32:33-0700',
'end_time': '2024-03-23T14:32:33-0700',
'campaign_id': '<adCampaignLinkClicksID>',
'bid_amount': '500',
'billing_event': 'IMPRESSIONS',
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.1'
__version__ = '19.0.2'
__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'
lifetime = 'lifetime'
maximum = 'maximum'
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',
'lifetime',
'maximum',
'this_month',
'this_quarter',
'this_week_mon_today',
Expand Down
31 changes: 0 additions & 31 deletions facebook_business/adobjects/adaccount.py
Expand Up @@ -1691,7 +1691,6 @@ def create_ad_video(self, fields=None, params=None, batch=None, success=None, fa
'fun_fact_toastee_id': 'unsigned int',
'guide': 'list<list<unsigned int>>',
'guide_enabled': 'bool',
'has_nickname': 'bool',
'holiday_card': 'string',
'initial_heading': 'unsigned int',
'initial_pitch': 'unsigned int',
Expand Down Expand Up @@ -4105,36 +4104,6 @@ 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
6 changes: 6 additions & 0 deletions facebook_business/adobjects/adaccountadvolume.py
Expand Up @@ -64,6 +64,7 @@ class RecommendationType:
app_aem_v2_installation_promotion = 'APP_AEM_V2_INSTALLATION_PROMOTION'
asc_budget_optimization = 'ASC_BUDGET_OPTIMIZATION'
asc_budget_optimization_pfr = 'ASC_BUDGET_OPTIMIZATION_PFR'
asc_creation_package = 'ASC_CREATION_PACKAGE'
aspect_ratio = 'ASPECT_RATIO'
atleast_6_placements = 'ATLEAST_6_PLACEMENTS'
auction_overlap = 'AUCTION_OVERLAP'
Expand All @@ -83,12 +84,14 @@ class RecommendationType:
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'
conversion_lead_ads = 'CONVERSION_LEAD_ADS'
cost_goal = 'COST_GOAL'
cost_goal_budget_limited = 'COST_GOAL_BUDGET_LIMITED'
cost_goal_cpa_limited = 'COST_GOAL_CPA_LIMITED'
cost_per_result = 'COST_PER_RESULT'
creation_package_upgrade_to_asc = 'CREATION_PACKAGE_UPGRADE_TO_ASC'
creation_package_upgrade_to_tla = 'CREATION_PACKAGE_UPGRADE_TO_TLA'
creation_package_upgrade_to_tmc = 'CREATION_PACKAGE_UPGRADE_TO_TMC'
creative_badge = 'CREATIVE_BADGE'
creative_diversity = 'CREATIVE_DIVERSITY'
creative_fatigue = 'CREATIVE_FATIGUE'
Expand All @@ -98,6 +101,7 @@ class RecommendationType:
creator_ads_pa_conversion = 'CREATOR_ADS_PA_CONVERSION'
cta = 'CTA'
ctx_budget_optimization = 'CTX_BUDGET_OPTIMIZATION'
ctx_guidance = 'CTX_GUIDANCE'
da_advantage_plus_creative_info_labels = 'DA_ADVANTAGE_PLUS_CREATIVE_INFO_LABELS'
dead_link = 'DEAD_LINK'
dynamic_advantage_campaign_budget = 'DYNAMIC_ADVANTAGE_CAMPAIGN_BUDGET'
Expand All @@ -110,6 +114,7 @@ class RecommendationType:
high_cost = 'HIGH_COST'
historical_benchmark = 'HISTORICAL_BENCHMARK'
ig_multi_ads = 'IG_MULTI_ADS'
lead_ads_guidance = 'LEAD_ADS_GUIDANCE'
learning_limited = 'LEARNING_LIMITED'
learning_pause_friction = 'LEARNING_PAUSE_FRICTION'
learning_phase_budget_edits = 'LEARNING_PHASE_BUDGET_EDITS'
Expand Down Expand Up @@ -143,6 +148,7 @@ class RecommendationType:
spend_limit = 'SPEND_LIMIT'
syd_test_mode = 'SYD_TEST_MODE'
tailored_lead_ad_campaign = 'TAILORED_LEAD_AD_CAMPAIGN'
tailored_messages_campaign = 'TAILORED_MESSAGES_CAMPAIGN'
top_adsets_with_ads_under_cap = 'TOP_ADSETS_WITH_ADS_UNDER_CAP'
top_campaigns_with_ads_under_cap = 'TOP_CAMPAIGNS_WITH_ADS_UNDER_CAP'
two_p_guidance_card_aaa = 'TWO_P_GUIDANCE_CARD_AAA'
Expand Down
2 changes: 2 additions & 0 deletions facebook_business/adobjects/adassetfeedadditionaldata.py
Expand Up @@ -29,13 +29,15 @@ class Field(AbstractObject.Field):
is_click_to_message = 'is_click_to_message'
multi_share_end_card = 'multi_share_end_card'
page_welcome_message = 'page_welcome_message'
partner_app_welcome_message_flow_id = 'partner_app_welcome_message_flow_id'

_field_types = {
'automated_product_tags': 'bool',
'brand_page_id': 'string',
'is_click_to_message': 'bool',
'multi_share_end_card': 'bool',
'page_welcome_message': 'string',
'partner_app_welcome_message_flow_id': 'string',
}
@classmethod
def _get_field_enum_info(cls):
Expand Down
Expand Up @@ -32,6 +32,7 @@ class Field(AbstractObject.Field):
bsg = 'bsg'
city_community = 'city_community'
commerce = 'commerce'
compromise = 'compromise'
daily_deals = 'daily_deals'
daily_deals_legacy = 'daily_deals_legacy'
dpa = 'dpa'
Expand Down Expand Up @@ -70,6 +71,7 @@ class Field(AbstractObject.Field):
'bsg': 'map<string, string>',
'city_community': 'map<string, string>',
'commerce': 'map<string, string>',
'compromise': 'map<string, string>',
'daily_deals': 'map<string, string>',
'daily_deals_legacy': 'map<string, string>',
'dpa': 'map<string, string>',
Expand Down
4 changes: 2 additions & 2 deletions facebook_business/adobjects/adset.py
Expand Up @@ -184,7 +184,7 @@ class DatePreset:
last_week_mon_sun = 'LAST_WEEK_MON_SUN'
last_week_sun_sat = 'LAST_WEEK_SUN_SAT'
last_year = 'LAST_YEAR'
lifetime = 'LIFETIME'
maximum = 'MAXIMUM'
this_month = 'THIS_MONTH'
this_quarter = 'THIS_QUARTER'
this_week_mon_today = 'THIS_WEEK_MON_TODAY'
Expand Down Expand Up @@ -321,7 +321,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',
'lifetime',
'maximum',
'this_month',
'this_quarter',
'this_week_mon_today',
Expand Down
12 changes: 11 additions & 1 deletion facebook_business/adobjects/adsinsights.py
Expand Up @@ -114,6 +114,7 @@ class Field(AbstractObject.Field):
marketing_messages_cost_per_delivered = 'marketing_messages_cost_per_delivered'
marketing_messages_cost_per_link_btn_click = 'marketing_messages_cost_per_link_btn_click'
marketing_messages_spend = 'marketing_messages_spend'
marketing_messages_website_purchase_values = 'marketing_messages_website_purchase_values'
mobile_app_purchase_roas = 'mobile_app_purchase_roas'
objective = 'objective'
optimization_goal = 'optimization_goal'
Expand Down Expand Up @@ -167,8 +168,12 @@ class ActionAttributionWindows:
value_1d_view = '1d_view'
value_28d_click = '28d_click'
value_28d_view = '28d_view'
value_28d_view_all_conversions = '28d_view_all_conversions'
value_28d_view_first_conversion = '28d_view_first_conversion'
value_7d_click = '7d_click'
value_7d_view = '7d_view'
value_7d_view_all_conversions = '7d_view_all_conversions'
value_7d_view_first_conversion = '7d_view_first_conversion'
dda = 'dda'
value_default = 'default'
skan_click = 'skan_click'
Expand All @@ -186,6 +191,8 @@ class ActionBreakdowns:
action_video_sound = 'action_video_sound'
action_video_type = 'action_video_type'
conversion_destination = 'conversion_destination'
matched_persona_id = 'matched_persona_id'
matched_persona_name = 'matched_persona_name'
signal_source_bucket = 'signal_source_bucket'
standard_event_content_type = 'standard_event_content_type'

Expand Down Expand Up @@ -253,7 +260,7 @@ class DatePreset:
last_week_mon_sun = 'last_week_mon_sun'
last_week_sun_sat = 'last_week_sun_sat'
last_year = 'last_year'
lifetime = 'lifetime'
maximum = 'maximum'
this_month = 'this_month'
this_quarter = 'this_quarter'
this_week_mon_today = 'this_week_mon_today'
Expand All @@ -280,6 +287,8 @@ class SummaryActionBreakdowns:
action_video_sound = 'action_video_sound'
action_video_type = 'action_video_type'
conversion_destination = 'conversion_destination'
matched_persona_id = 'matched_persona_id'
matched_persona_name = 'matched_persona_name'
signal_source_bucket = 'signal_source_bucket'
standard_event_content_type = 'standard_event_content_type'

Expand Down Expand Up @@ -377,6 +386,7 @@ def get_endpoint(cls):
'marketing_messages_cost_per_delivered': 'string',
'marketing_messages_cost_per_link_btn_click': 'string',
'marketing_messages_spend': 'string',
'marketing_messages_website_purchase_values': 'string',
'mobile_app_purchase_roas': 'list<AdsActionStats>',
'objective': 'string',
'optimization_goal': 'string',
Expand Down
3 changes: 1 addition & 2 deletions facebook_business/adobjects/advideo.py
Expand Up @@ -100,7 +100,6 @@ class Field(AbstractObject.Field):
fun_fact_toastee_id = 'fun_fact_toastee_id'
guide = 'guide'
guide_enabled = 'guide_enabled'
has_nickname = 'has_nickname'
holiday_card = 'holiday_card'
initial_heading = 'initial_heading'
initial_pitch = 'initial_pitch'
Expand Down Expand Up @@ -246,6 +245,7 @@ class ContainerType:
music_clip_in_audio_digest = 'MUSIC_CLIP_IN_AUDIO_DIGEST'
music_clip_in_comment = 'MUSIC_CLIP_IN_COMMENT'
music_clip_in_lightweight_status = 'MUSIC_CLIP_IN_LIGHTWEIGHT_STATUS'
music_clip_in_msgr_note = 'MUSIC_CLIP_IN_MSGR_NOTE'
music_clip_in_poll_option = 'MUSIC_CLIP_IN_POLL_OPTION'
music_clip_on_dating_profile = 'MUSIC_CLIP_ON_DATING_PROFILE'
neo_async_game_video = 'NEO_ASYNC_GAME_VIDEO'
Expand Down Expand Up @@ -1240,7 +1240,6 @@ def get_video_insights(self, fields=None, params=None, batch=None, success=None,
'fun_fact_toastee_id': 'unsigned int',
'guide': 'list<list<unsigned int>>',
'guide_enabled': 'bool',
'has_nickname': 'bool',
'holiday_card': 'string',
'initial_heading': 'unsigned int',
'initial_pitch': 'unsigned int',
Expand Down
1 change: 0 additions & 1 deletion facebook_business/adobjects/album.py
Expand Up @@ -304,7 +304,6 @@ def create_photo(self, fields=None, params=None, batch=None, success=None, failu
'proxied_app_id': 'string',
'published': 'bool',
'qn': 'string',
'scheduled_publish_time': 'unsigned int',
'spherical_metadata': 'map',
'sponsor_id': 'string',
'sponsor_relationship': 'unsigned int',
Expand Down
1 change: 1 addition & 0 deletions facebook_business/adobjects/avatar.py
Expand Up @@ -66,6 +66,7 @@ def get_models(self, fields=None, params=None, batch=None, success=None, failure
param_types = {
'client_name': 'string',
'client_version': 'string',
'config_id': 'string',
'force_generate': 'bool',
'platform': 'string',
'profile': 'string',
Expand Down
1 change: 0 additions & 1 deletion facebook_business/adobjects/business.py
Expand Up @@ -3867,7 +3867,6 @@ def create_video(self, fields=None, params=None, batch=None, success=None, failu
'fun_fact_toastee_id': 'unsigned int',
'guide': 'list<list<unsigned int>>',
'guide_enabled': 'bool',
'has_nickname': 'bool',
'holiday_card': 'string',
'initial_heading': 'unsigned int',
'initial_pitch': 'unsigned int',
Expand Down
4 changes: 2 additions & 2 deletions facebook_business/adobjects/campaign.py
Expand Up @@ -114,7 +114,7 @@ class DatePreset:
last_week_mon_sun = 'last_week_mon_sun'
last_week_sun_sat = 'last_week_sun_sat'
last_year = 'last_year'
lifetime = 'lifetime'
maximum = 'maximum'
this_month = 'this_month'
this_quarter = 'this_quarter'
this_week_mon_today = 'this_week_mon_today'
Expand Down Expand Up @@ -496,7 +496,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',
'lifetime',
'maximum',
'this_month',
'this_quarter',
'this_week_mon_today',
Expand Down
2 changes: 0 additions & 2 deletions facebook_business/adobjects/catalogsubverticallist.py
Expand Up @@ -53,7 +53,6 @@ class Field(AbstractObject.Field):
local_service_business_item = 'local_service_business_item'
local_service_business_restaurant = 'local_service_business_restaurant'
loyalty_offer = 'loyalty_offer'
meetup_space = 'meetup_space'
nursery = 'nursery'
printers_and_scanners = 'printers_and_scanners'
printers_scanners_and_fax_machines = 'printers_scanners_and_fax_machines'
Expand Down Expand Up @@ -109,7 +108,6 @@ class Field(AbstractObject.Field):
'local_service_business_item': 'Object',
'local_service_business_restaurant': 'Object',
'loyalty_offer': 'Object',
'meetup_space': 'Object',
'nursery': 'Object',
'printers_and_scanners': 'Object',
'printers_scanners_and_fax_machines': 'Object',
Expand Down
1 change: 1 addition & 0 deletions facebook_business/adobjects/customaudiencedatasource.py
Expand Up @@ -58,6 +58,7 @@ class SubType:
instant_article_events = 'INSTANT_ARTICLE_EVENTS'
lookalike_platform = 'LOOKALIKE_PLATFORM'
mail_chimp_email_hashes = 'MAIL_CHIMP_EMAIL_HASHES'
marketplace_listings = 'MARKETPLACE_LISTINGS'
messenger_onsite_subscription = 'MESSENGER_ONSITE_SUBSCRIPTION'
mobile_advertiser_ids = 'MOBILE_ADVERTISER_IDS'
mobile_app_combination_events = 'MOBILE_APP_COMBINATION_EVENTS'
Expand Down
2 changes: 2 additions & 0 deletions facebook_business/adobjects/fundingsourcedetails.py
Expand Up @@ -28,12 +28,14 @@ def __init__(self, fbid=None, parent_id=None, api=None):

class Field(AbstractObject.Field):
coupon = 'coupon'
coupons = 'coupons'
display_string = 'display_string'
id = 'id'
type = 'type'

_field_types = {
'coupon': 'FundingSourceDetailsCoupon',
'coupons': 'list<FundingSourceDetailsCoupon>',
'display_string': 'string',
'id': 'string',
'type': 'int',
Expand Down

0 comments on commit ff8c1c6

Please sign in to comment.